Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37739704
en ru br
Репозитории ALT
S:0.2800-alt1
5.1: 0.1901-alt2
4.1: 0.09-alt1
4.0: 0.09-alt1
3.0: 0.09-alt1
www.altlinux.org/Changes

Группа :: Разработка/Perl
Пакет: perl-Sub-Uplevel

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Текущая версия: 0.09-alt1
Время сборки: 7 июня 2005, 02:12 ( 986.6 недели назад )
Размер архива: 21.82 Kb

Домашняя страница:   http://www.cpan.org

Лицензия: Artistic
О пакете: Sub-Uplevel - apparently run a function in a higher stack frame
Описание:

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

Текущий майнтейнер: Vitaly Lipatov

Список всех майнтейнеров, принимавших участие
в данной и/или предыдущих сборках пакета:

Список rpm-пакетов, предоставляемый данным srpm-пакетом:

  • perl-Sub-Uplevel
ACL:
     
    дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
    текущий майнтейнер: Michael Shigorin