X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FScope%2FUpper.pm;h=d276ae443f69b291cdcbe5ed8fa21b59da2af945;hb=89a12f26ecf373c17af1cae2cb6a80b1d6f37376;hp=3b801161f5ce315a24e70bc2041a7de7154f2134;hpb=da4cceb83810de827ceba611a1459c0afd672039;p=perl%2Fmodules%2FScope-Upper.git diff --git a/lib/Scope/Upper.pm b/lib/Scope/Upper.pm index 3b80116..d276ae4 100644 --- a/lib/Scope/Upper.pm +++ b/lib/Scope/Upper.pm @@ -72,7 +72,9 @@ BEGIN { sub zap { try { return @things; # returns to try() and then outside zap() + # not reached } + # not reached } my @what = zap(); # @what contains @things @@ -115,7 +117,7 @@ BEGIN { =head2 C -Add a destructor that calls C<$callback> when the upper scope represented by C<$context> ends. +Add a destructor that calls C<$callback> (in void context) when the upper scope represented by C<$context> ends. =head2 C @@ -189,6 +191,7 @@ This means that my $num = sub { my @a = ('a' .. 'z'); unwind @a => HERE; + # not reached }->(); will set C<$num> to C<'z'>. @@ -203,6 +206,7 @@ The previous example can then be "corrected" : my $num = sub { my @a = ('a' .. 'z'); unwind +(want_at(HERE) ? @a : scalar @a) => HERE; + # not reached }->(); will righteously set C<$num> to C<26>.