Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37839353
en ru br
ALT Linux repositórios
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 :: Desenvolvimento/Perl
RPM: perl-Sub-Uplevel

 Principal   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

A versão atual: 0.09-alt1
Data da compilação: 7 junho 2005, 02:12 ( 987.3 weeks ago )
Tamanho:: 21.82 Kb

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

Licença: Artistic
Sumário: Sub-Uplevel - apparently run a function in a higher stack frame
Descrição:

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;
   }

Mantenedor currente: Vitaly Lipatov

Lista dos contribuidores

Lista dos rpms provida por esta srpm:

  • perl-Sub-Uplevel
ACL:
     
    projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
    mantenedor atual: Michael Shigorin
    mantenedor da tradução: Fernando Martini aka fmartini © 2009