X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FScope%2FUpper.pm;h=30f94547df8d937db1481de5b8bfdfa76e1ea1c0;hb=fe22a6565e85581207e3f4222eae26bc268223e4;hp=0de64ff6e5dae70f673a9584c5d74ada9a2dbc25;hpb=5d1ba2b5e95b62d8afc07902b5d199151048d70f;p=perl%2Fmodules%2FScope-Upper.git
diff --git a/lib/Scope/Upper.pm b/lib/Scope/Upper.pm
index 0de64ff..30f9454 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.10
=cut
our $VERSION;
BEGIN {
- $VERSION = '0.07';
+ $VERSION = '0.10';
}
=head1 SYNOPSIS
@@ -117,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
@@ -209,7 +209,13 @@ The previous example can then be "corrected" :
# not reached
}->();
-will righteously set C<$num> to C<26>.
+will rightfully set C<$num> to C<26>.
+
+=head1 CONSTANTS
+
+=head2 C
+
+True iff the module could have been built when thread-safety features.
=head1 WORDS
@@ -318,6 +324,8 @@ Where L and L point to depending on the C<$cxt>:
The functions L, L, L, L, L and L are only exported on request, either individually or by the tags C<':funcs'> and C<':all'>.
+The constant L is also only exported on request, individually or by the tags C<':consts'> and C<':all'>.
+
Same goes for the words L, L, L, L, L, L and L that are only exported on request, individually or by the tags C<':words'> and C<':all'>.
=cut
@@ -326,8 +334,9 @@ use base qw/Exporter/;
our @EXPORT = ();
our %EXPORT_TAGS = (
- funcs => [ qw/reap localize localize_elem localize_delete unwind want_at/ ],
- words => [ qw/TOP HERE UP SUB EVAL SCOPE CALLER/ ],
+ funcs => [ qw/reap localize localize_elem localize_delete unwind want_at/ ],
+ words => [ qw/TOP HERE UP SUB EVAL SCOPE CALLER/ ],
+ consts => [ qw/SU_THREADSAFE/ ],
);
our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
$EXPORT_TAGS{'all'} = [ @EXPORT_OK ];
@@ -369,6 +378,9 @@ L (standard since perl 5.006).
L, L, L, L.
+L is a thin wrapper around L that gives you a continuation passing style interface to L.
+It's easier to use, but it requires you to have control over the scope where you want to return.
+
=head1 AUTHOR
Vincent Pit, C<< >>, L.
@@ -395,7 +407,7 @@ Thanks to Shawn M. Moore for motivation.
=head1 COPYRIGHT & LICENSE
-Copyright 2008-2009 Vincent Pit, all rights reserved.
+Copyright 2008,2009,2010 Vincent Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.