Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37834163
en ru br
ALT Linux repos
S:0.2800-alt1
5.0: 0.1901-alt2
4.1: 0.09-alt1
4.0: 0.09-alt1
3.0: 0.09-alt1

Group :: Development/Perl
RPM: perl-Sub-Uplevel

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Current version: 0.09-alt1
Build date: 7 june 2005, 02:12 ( 987.2 weeks ago )
Size: 21.82 Kb

Home page:   http://www.cpan.org

License: Artistic
Summary: Sub-Uplevel - apparently run a function in a higher stack frame
Description:

Like Tcl's uplevel() function, but not quite so dangerous.  The idea
is just to fool caller().  All the really naughty bits of Tcl's
uplevel() are avoided.

THIS IS NOT THE SORT OF THING YOU WANT TO DO EVERYDAY

=over 4

=item uplevel

 uplevel $num_frames, \&func, @args;

Makes the given function think it's being executed $num_frames higher
than the current stack level.  So when they use caller($frames) it
will actually caller($frames + $num_frames) for them.

"uplevel(1, \&some_func, @_)" is effectively "goto &some_func" but
you don't immediately exit the current subroutine.  So while you can't
do this:

   sub wrapper {
       print "Before\n";
       goto &some_func;
       print "After\n";
   }

you can do this:

   sub wrapper {
       print "Before\n";
       my @out = uplevel 1, &some_func;
       print "After\n";
       return @out;
   }

Current maintainer: Vitaly Lipatov

List of contributors

List of rpms provided by this srpm:

  • perl-Sub-Uplevel
ACL:
     
    design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
    current maintainer: Michael Shigorin