Revision history for Scope-Upper
+0.08 2009-04-16 22:50 UTC
+ + Fix : [RT #44204] : Stack corruption with reap(). Thanks Torsten
+ Foertsch for reporting.
+ + Fix : Building with Solaris CC.
+ + Tst : unwind() in threads.
+
0.07 2009-02-20 00:20 UTC
+ Chg : The CLONE method will no longer be defined for non-threaded
perls.
--- #YAML:1.0
name: Scope-Upper
-version: 0.07
+version: 0.08
abstract: Act on upper scopes.
author:
- Vincent Pit <perl@profvince.com>
bugtracker: http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Scope-Upper
homepage: http://search.cpan.org/dist/Scope-Upper/
license: http://dev.perl.org/licenses/
- repository: http://git.profvince.com/perl/modules/Scope-Upper.git
+ repository: http://git.profvince.com/?p=perl/modules/Scope-Upper.git
no_index:
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.48
+generated_by: ExtUtils::MakeMaker version 6.50
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Scope::Upper - Act on upper scopes.
VERSION
- Version 0.07
+ Version 0.08
SYNOPSIS
package X;
sub zap {
try {
return @things; # returns to try() and then outside zap()
+ # not reached
}
+ # not reached
}
my @what = zap(); # @what contains @things
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
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.
my $num = sub {
my @a = ('a' .. 'z');
unwind +(want_at(HERE) ? @a : scalar @a) => HERE;
+ # not reached
}->();
will righteously set $num to 26.
=head1 VERSION
-Version 0.07
+Version 0.08
=cut
our $VERSION;
BEGIN {
- $VERSION = '0.07';
+ $VERSION = '0.08';
}
=head1 SYNOPSIS