@@ -232,7+232,7 @@ Returns a boolean indicating whether a new instance of C<@_> was set up for this
$cxt->gimme;
$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.
-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
=cut
@@ -333,7+333,7 @@ If omitted, C<$frames> defaults to C<1>.
sub {
{
{
sub {
{
{
- my $up = Scope::Context->new->up(2); # = Scope::Context->up(2)
+ my $up = Scope::Context->new->up(2); # == Scope::Context->up(2)
# $up points two contextes above this one, which is the sub.
}
}
# $up points two contextes above this one, which is the sub.
}
}
@@ -378,7+378,7 @@ If omitted, C<$frames> defaults to C<0>, which results in the closest sub enclos
}
sub inner {
}
sub inner {
- my $sub = Scope::Context->new->sub(1); # = Scope::Context->sub(1)
+ my $sub = Scope::Context->new->sub(1); # == Scope::Context->sub(1)
# $sub points to the context for the outer() sub.
}
# $sub points to the context for the outer() sub.
}
@@ -417,7+417,7 @@ If omitted, C<$frames> defaults to C<0>, which results in the closest eval enclo
eval {
sub {
eval {
sub {
- my $eval = Scope::Context->new->eval; # = Scope::Context->eval
+ my $eval = Scope::Context->new->eval; # == Scope::Context->eval
-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.
-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.
-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.