So I have no where I can assign the newly generate sub.
Maybe with Data::Swap, you can work around this problem. I haven't tried yet, but I'm thinking of something like
I have no idea if this would work.use Data::Swap; sub myhandler : ATTR(CODE) { my ($p, $s, $r, ...) = @_; swap $r, \my $o; swap $r, sub { # code &$o; }; }
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In reply to Re: How to redefine subroutines with Attribute::Handlers that run at BEGIN time?
by Juerd
in thread How to redefine subroutines with Attribute::Handlers that run at BEGIN time?
by lestrrat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |