Gives:#!/usr/bin/perl use strict; use warnings; use B::Deparse; sub myfunc { print "Hello @_\n"; return 42 } my $tricky = \&myfunc; my $deparse = B::Deparse->new(); my $body = $deparse->coderef2text($tricky); print "$body\n";
{ use warnings; use strict 'refs'; print "Hello @_\n"; return 42; }
In reply to Re: Saving/recovering sub refs in a file
by cdarke
in thread Saving/recovering sub refs in a file
by madscientist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |