I have the following to output the contents of a $func which contains a code reference:
my $deparse = B::Deparse->new; print dumper $deparse->coderef2text($func);
It spits out:
$VAR1 = '{ package Spin::Command::spin; run(q[export MYVAR=\'(R)?ex\']); run(\'uname -a\'); run(q[echo \'Running: \' $MYVAR]); run(\'id\'); }';
I'd like to change the package from Spin::Command::spin to something else. Is this possible?
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
In reply to Possible to change package of code reference? by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |