in reply to Re^2: Printing the code of a coderef
in thread Printing the code of a coderef

I guess that's the best we can get now. I don't know what B::Deparse exactly does, but it seems to handle the do statement specially. As shown in another reply with Sub::Information, the result is the same with with Data::Dump::Streamer which in turn also uses B::Deparse. Consider and compare with the following code.
use Data::Dump::Streamer; sub somecode { my $x = shift; if ($x) { print "x ok\n"; } else { print "what do you want?\n"; } return 1; } print Dump(\&somecode); __END__ # result: $CODE1 = sub { my $x = shift @_; if ($x) { print "x ok\n"; } else { print "what do you want?\n"; } return 1; };

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!