One of the few places that goto LABEL is useful.sub localize { my $real = pop; no strict 'refs'; AGAIN: local *{shift@_} = sub { 'changed' }; goto AGAIN if @_; $real->(); }
In reply to Re: A general method of locally overriding subroutines
by dragonchild
in thread A general method of locally overriding subroutines
by tmoertel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |