]> git.vpit.fr Git - perl/modules/Scope-Context.git/blobdiff - lib/Scope/Context.pm
Clarify the descriptions of ->localize{,_elem,_delete}()
[perl/modules/Scope-Context.git] / lib / Scope / Context.pm
index bf0f7c0502a97b590f2b99259f58c6c08ded2a7c..c9b778e309cb301c4655aaf0035a1a2511b97c17 100644 (file)
@@ -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<perlfunc/wantarray>) in which the scope denoted by the invocant is executed.
+Returns the context (in the sense of C<perlfunc/wantarray> : C<undef> for void context, C<''> for scalar context, and true for list context) in which the scope denoted by the invocant is executed.
 
 =head2 C<eval_text>
 
@@ -306,7 +306,7 @@ BEGIN {
 
     my $want = $cxt->want;
 
-Returns the Perl context (in the sense of C<wantarray> : C<undef> 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<perlfunc/wantarray>) in which is executed the closest subroutine, eval or format enclosing the scope pointed by the invocant.
 
 =cut
 
@@ -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.
+Localize 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<Scope::Upper/localize> 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.
+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, until said scope ends.
 
 See L<Scope::Upper/localize_elem> 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.
+Delete the element C<$key> from the variable C<$what> when the control flow returns to the scope pointed by the invocant, and restore it to its original value when said scope ends.
 
 See L<Scope::Upper/localize_delete> for details.