Revision history for Scope-Upper
+0.21 2012-09-21 15:10 UTC
+ + Fix : context_info() has been taught about perl 5.17.4.
+ + Fix : t/07-context_info.t will no longer fail with perls that have
+ sitecustomize enabled (like many perl builds for Windows).
+ Thanks Steve Hay and Nicholas Clark for debugging help.
+ + Fix : Broken linkage on Windows with gcc 3.4, which appears in
+ particular when using ActivePerl's default compiler suite.
+ For those setups, the Scope::Upper shared library will now be
+ linked against the perl dll directly (instead of the import
+ library).
+
0.20 2012-09-17 11:00 UTC
+ Add : The new yield(@values, $context) function can be used to return
values to any upper scope, including do or map blocks.
Scope::Upper - Act on upper scopes.
VERSION
- Version 0.20
+ Version 0.21
SYNOPSIS
"reap", "localize", "localize_elem", "localize_delete" and "WORDS" :
unwind @values, $context;
Returns @values *from* the subroutine, eval or format context pointed by
- or just above $context, and immediately restart the program flow at this
- point - thus effectively returning @values to an upper scope. If @values
- is empty, then the $context parameter is optional and defaults to the
- current context (making the call equivalent to a bare "return;") ;
- otherwise it is mandatory.
+ or just above $context, and immediately restarts the program flow at
+ this point - thus effectively returning @values to an upper scope. If
+ @values is empty, then the $context parameter is optional and defaults
+ to the current context (making the call equivalent to a bare "return;")
+ ; otherwise it is mandatory.
The upper context isn't coerced onto @values, which is hence always
evaluated in list context. This means that
yield @values, $context;
Returns @values *from* the context pointed by or just above $context,
- and immediately restart the program flow at this point. If @values is
+ and immediately restarts the program flow at this point. If @values is
empty, then the $context parameter is optional and defaults to the
current context ; otherwise it is mandatory.
Immediately returns @values from the current block, whatever it may be
(besides a "s///e" substitution context). "leave" is actually a synonym
- for "unwind HERE", while "leave @values" is a synonym for "yield
- @values, HERE".
+ for "yield HERE", while "leave @values" is a synonym for "yield @values,
+ HERE".
Like for "yield", you can use the fifth value returned by "context_info"
to handle context coercion.
and format contexts. When $context is omitted, it defaults to the
current context.
- The values returned are, in order :
+ The returned values are, in order :
* *(index 0)* : the namespace in use when the context was created ;