X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FScope%2FContext.pm;h=bf13a30ec0facc4bab72f8221f957f7e6e727f33;hb=6be87d59f17965b9e4e92f71727379e19929d896;hp=70f68c008d6309196e7b8ed0f4a6044b38595833;hpb=db0decc19198c2e881faabebcb4b1372d26c5d5c;p=perl%2Fmodules%2FScope-Context.git diff --git a/lib/Scope/Context.pm b/lib/Scope/Context.pm index 70f68c0..bf13a30 100644 --- a/lib/Scope/Context.pm +++ b/lib/Scope/Context.pm @@ -232,7 +232,7 @@ Returns a boolean indicating whether a new instance of C<@_> was set up for this $cxt->gimme; -Returns the context (in the sense of L) in which the scope denoted by the invocant is executed. +Returns the context (in the sense of C : C for void context, C<''> for scalar context, and true for list context) in which the scope denoted by the invocant is executed. =head2 C @@ -293,7 +293,7 @@ BEGIN { my \$info = \$self->{info}; \$info = \$self->{info} = [ Scope::Upper::context_info(\$self->cxt) ] - unless \$info; + unless \$info; return \$info->[$idx]; } @@ -306,7 +306,7 @@ BEGIN { my $want = $cxt->want; -Returns the Perl context (in the sense of C : C for void context, C<''> for scalar context, and true for list context) in which is executed the scope pointed by the invocant. +Returns the Perl context (in the sense of C) in which is executed the closest subroutine, eval or format enclosing the scope pointed by the invocant. =cut @@ -447,7 +447,7 @@ sub eval { $cxt->reap($code); -Execute C<$code> when the scope pointed by the invocant ends. +Executes C<$code> when the scope pointed by the invocant ends. See L for details. @@ -465,7 +465,7 @@ sub reap { $cxt->localize($what, $value); -Localize the variable described by C<$what> to the value C<$value> when the control flow returns to the scope pointed by the invocant. +Localizes the variable described by C<$what> to the value C<$value> when the control flow returns to the scope pointed by the invocant, until said scope ends. See L for details. @@ -483,7 +483,7 @@ sub localize { $cxt->localize_elem($what, $key, $value); -Localize the element C<$key> of the variable C<$what> to the value C<$value> when the control flow returns to the scope pointed by the invocant. +Localizes the element C<$key> of the variable C<$what> to the value C<$value> when the control flow returns to the scope pointed by the invocant, until said scope ends. See L for details. @@ -501,7 +501,7 @@ sub localize_elem { $cxt->localize_delete($what, $key); -Delete the element C<$key> from the variable C<$what> when the control flow returns to the scope pointed by the invocant. +Deletes the element C<$key> from the variable C<$what> when the control flow returns to the scope pointed by the invocant, and restores it to its original value when said scope ends. See L for details. @@ -572,7 +572,7 @@ sub uplevel { =head1 DEPENDENCIES -L (core module since perl 5), L (since 5.7.3). +L (core module since perl 5), L (since 5.2.0), L (since 5.7.3). L 0.21.