and have it return:use Some::Module; sub somecode { do { print "some stuff\n" } } my $somevar = Some::Module->new(); print $somevar->printcode(\&somecode);
?do { print "some stuff\n" }
In reply to Printing the code of a coderef by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |