in reply to how can I access code ref contents, not call it?
With perl 5.6 you should be able to say:
(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.use B::Deparse; sub bar { print "foo" } my $deparse = B::Deparse->new(); my $body = $dep->coderef2text(\&bar); print $body;
Autark.
In Section
Seekers of Perl Wisdom