in reply to Re^2: Possible to change package of code reference?
in thread Possible to change package of code reference?
$func= eval qq( sub {$newtext} );
Another possibility is to temporarily patch &run before executing $func.
local *Spin::Command::spin::run = sub { "new code" }
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Possible to change package of code reference?
by nysus (Parson) on Oct 21, 2018 at 21:10 UTC | |
by LanX (Saint) on Oct 21, 2018 at 22:12 UTC | |
|
Re^4: Possible to change package of code reference?
by nysus (Parson) on Oct 21, 2018 at 20:46 UTC |