Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Enchant closures for better debugging output in Perl
(
effectiveperlprogramming.com
)
31 points
by
rcfox
on Sept 21, 2011
|
hide
|
past
|
favorite
|
2 comments
pavelkaroukin
on Sept 21, 2011
|
next
[–]
tl;dr; It is hard to debug by "print $abc;" when $abc is code reference. So you bless code reference with package providing stringification override to print out closure position (file, line) and "near" defined variables. Pretty useful!
jrockway
on Sept 21, 2011
|
prev
[–]
Shouldn't you name your package CODE instead of "MagicalCoderef" so that ref returns the "right" value? :)
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: