in reply to how can I access code ref contents, not call it?
(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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 2: how can I access code ref contents, not call it?
by tilly (Archbishop) on Jan 04, 2001 at 05:55 UTC |