http://qs321.pair.com?node_id=49668


in reply to how can I access code ref contents, not call it?

With perl 5.6 you should be able to say:
use B::Deparse; sub bar { print "foo" } my $deparse = B::Deparse->new(); my $body = $dep->coderef2text(\&bar); print $body;
(See perldoc B::Deparse). This returns the coderef as plain text. Or you might use the B module via the O module to do some of the work yourself.

Autark.