X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FScope%2FUpper.pm;h=377e434e5bd8adc8c6e2be7e2bd4f20b692155c8;hb=52e46d61da554bbc0d80d317e07176bb730f3efb;hp=34fe41fc26ad6d6c90d4ed6138250c61d0fdd7f8;hpb=9cc51a42b5f5145b3d1e9ed89435b5377ebdd5fe;p=perl%2Fmodules%2FScope-Upper.git
diff --git a/lib/Scope/Upper.pm b/lib/Scope/Upper.pm
index 34fe41f..377e434 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.16
+Version 0.17
=cut
our $VERSION;
BEGIN {
- $VERSION = '0.16';
+ $VERSION = '0.17';
}
=head1 SYNOPSIS
@@ -149,7 +149,7 @@ return values immediately to an upper level with L, and know which cont
=item *
-execute a subroutine in the context of an upper subroutine stack frame with L.
+execute a subroutine in the setting of an upper subroutine stack frame with L.
=back
@@ -300,7 +300,7 @@ The code is executed in the context of the C call, and what it returns
}
my @inverses = target(1, 2, 4); # @inverses contains (0, 0.5, 0.25)
- my $count = target(1, 2, 4); # $target is 3
+ my $count = target(1, 2, 4); # $count is 3
L also implements a pure-Perl version of C.
Both are identical, with the following caveats :
@@ -310,7 +310,7 @@ Both are identical, with the following caveats :
=item *
The L implementation of C may execute a code reference in the context of B upper stack frame.
-The L version only allows to uplevel to a B stack frame, and will croak if you try to target an C or a format.
+The L version can only uplevel to a B stack frame, and will croak if you try to target an C or a format.
=item *
@@ -336,7 +336,7 @@ will print "inner block: wut..." with L and "outer block: wut..."
=item *
-L globally overrides C, while L does not.
+L globally overrides the Perl keyword C, while L does not.
=back
@@ -463,7 +463,7 @@ Where L, L and L point to depending on the C<$cxt>:
...
# (*) Note that uplevel() will croak if you pass that scope frame,
- # because it can't target eval scopes.
+ # because it cannot target eval scopes.
=head1 EXPORT
@@ -520,6 +520,12 @@ However, it's possible to hook the end of the current scope compilation with L to replace an L'd code frame does not work when a custom runloop is used or when debugging flags are set with C.
+In those two cases, L will look for a C statement in its callback and, if there is one, throw an exception before executing the code.
+
+Moreover, in order to handle C statements properly, L currently has to suffer a run-time overhead proportional to the size of the the callback in every case (with a small ratio), and proportional to the size of B the code executed as the result of the L call (including subroutine calls inside the callback) when a C statement is found in the L callback.
+Despite this shortcoming, this XS version of L should still run way faster than the pure-Perl version from L.
+
=head1 DEPENDENCIES
L (standard since perl 5.006).
@@ -530,13 +536,13 @@ L, L.
L, 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.
L.
-L provides a pure-Perl implementation of L.
-
=head1 AUTHOR
Vincent Pit, C<< >>, L.