X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=README;h=d0327e14cd8e52e39197258c9761d383e6849ed2;hb=4c8461e81387b2f965156423ae04f418d8da1312;hp=16f88ca56cd9895c60ad6903efac19530457fa7e;hpb=89a12f26ecf373c17af1cae2cb6a80b1d6f37376;p=perl%2Fmodules%2FScope-Upper.git diff --git a/README b/README index 16f88ca..d0327e1 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME Scope::Upper - Act on upper scopes. VERSION - Version 0.07 + Version 0.08 SYNOPSIS package X; @@ -57,7 +57,9 @@ SYNOPSIS sub zap { try { return @things; # returns to try() and then outside zap() + # not reached } + # not reached } my @what = zap(); # @what contains @things @@ -86,8 +88,8 @@ FUNCTIONS needed, and it will still denote the original scope. "reap $callback, $context" - Add a destructor that calls $callback when the upper scope represented - by $context ends. + Add a destructor that calls $callback (in void context) when the upper + scope represented by $context ends. "localize $what, $value, $context" A "local" delayed to the time of first return into the upper scope @@ -151,6 +153,7 @@ FUNCTIONS my $num = sub { my @a = ('a' .. 'z'); unwind @a => HERE; + # not reached }->(); will set $num to 'z'. You can use "want_at" to handle these cases. @@ -164,6 +167,7 @@ FUNCTIONS my $num = sub { my @a = ('a' .. 'z'); unwind +(want_at(HERE) ? @a : scalar @a) => HERE; + # not reached }->(); will righteously set $num to 26.