Take me over?
The maintainer of this distribution is looking for someone to take over!
If you're interested then please contact them via
email.
NAME
Sub::Uplevel - run a function in a higher stack frame
SYNOPSIS
use Sub::Uplevel;
sub foo {
print join " - ", caller;
}
sub bar {
uplevel 1, \&foo;
}
#line 11
bar(); # main - foo.plx - 11
DESCRIPTION
Like Tcl's uplevel() function, but not quite so dangerous. The idea is to fool caller(). All the other nasty bits of uplevel are unnecessary in Perl.
- uplevel
-
uplevel $num_frames, \&func, @args;
Makes the given function think it's being executed $num_frames higher than the current stack level. So caller() will be caller($num_frames) for them.
BUGS and CAVEATS
Symbol::Uplevel must be used before any code which uses it.