3 ms·
Enchant closures for better debugging output in Perl
- pavelkaroukin 15y agotl;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 15y agoShouldn't you name your package CODE instead of "MagicalCoderef" so that ref returns the "right" value? :)