the new generation of data dumping does streamline this using B::Deparse
cheers --stephan% steph@apexPDell2 (/home/stephan/t1) % % date Tue Jun 26 15:04:14 2007 % steph@apexPDell2 (/home/stephan/t1) % % date; cat Some/Module.pm Tue Jun 26 15:04:27 2007 package Some::Module; sub somecode { do { print "some stuff\n" } } 1; % steph@apexPDell2 (/home/stephan/t1) % % perl -MDDS -MSome::Module -e 'Dump(\&Some::Module::somecode)'; date $CODE1 = sub { package Some::Module; do { do { print "some stuff\n" } }; }; Tue Jun 26 15:04:32 2007
In reply to Re^3: Printing the code of a coderef
by sgt
in thread Printing the code of a coderef
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |