X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=README;h=860d3e1b54cf13acd18920fe3d4b99f31c50129d;hb=2e108d5ecae04d8de77b31a357e97990030b8557;hp=16f88ca56cd9895c60ad6903efac19530457fa7e;hpb=da4cceb83810de827ceba611a1459c0afd672039;p=perl%2Fmodules%2FScope-Upper.git diff --git a/README b/README index 16f88ca..860d3e1 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME Scope::Upper - Act on upper scopes. VERSION - Version 0.07 + Version 0.09 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,10 +167,15 @@ FUNCTIONS my $num = sub { my @a = ('a' .. 'z'); unwind +(want_at(HERE) ? @a : scalar @a) => HERE; + # not reached }->(); will righteously set $num to 26. +CONSTANTS + "SU_THREADSAFE" + True iff the module could have been built when thread-safety features. + WORDS Constants "TOP" @@ -268,6 +276,9 @@ EXPORT "unwind" and "want_at" are only exported on request, either individually or by the tags ':funcs' and ':all'. + The constant "SU_THREADSAFE" is also only exported on request, + individually or by the tags ':consts' and ':all'. + Same goes for the words "TOP", "HERE", "UP", "SUB", "EVAL", "SCOPE" and "CALLER" that are only exported on request, individually or by the tags ':words' and ':all'.