How to localize a variable in an upper scope in Perl?
I have run across the following pattern a few times while developing Perl modules that use AUTOLOAD or other subroutine dispatch techniques: sub AUTOLOAD { my $self = $_[0]; my $code = $self->figure_out_code_ref( $AUTOLOAD ); goto &$code; } This works fine, and caller sees the correct scope. Now what I would like to do ...