X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FScope%2FUpper.pm;h=104674dae43167fb3afd32fda5f2b9f04a2db6c7;hb=refs%2Ftags%2Fv0.08;hp=3b801161f5ce315a24e70bc2041a7de7154f2134;hpb=da4cceb83810de827ceba611a1459c0afd672039;p=perl%2Fmodules%2FScope-Upper.git diff --git a/lib/Scope/Upper.pm b/lib/Scope/Upper.pm index 3b80116..104674d 100644 --- a/lib/Scope/Upper.pm +++ b/lib/Scope/Upper.pm @@ -9,13 +9,13 @@ Scope::Upper - Act on upper scopes. =head1 VERSION -Version 0.07 +Version 0.08 =cut our $VERSION; BEGIN { - $VERSION = '0.07'; + $VERSION = '0.08'; } =head1 SYNOPSIS @@ -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>.