X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FScope%2FContext.pm;h=70f68c008d6309196e7b8ed0f4a6044b38595833;hb=db0decc19198c2e881faabebcb4b1372d26c5d5c;hp=ffc139e1835a1c859db8ca18fdf58ba36eb69d8e;hpb=78cfdeb253000a116c0c48488d2d14dbf61e6d06;p=perl%2Fmodules%2FScope-Context.git diff --git a/lib/Scope/Context.pm b/lib/Scope/Context.pm index ffc139e..70f68c0 100644 --- a/lib/Scope/Context.pm +++ b/lib/Scope/Context.pm @@ -333,7 +333,7 @@ If omitted, C<$frames> defaults to C<1>. 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. } } @@ -365,7 +365,7 @@ sub up { my $sub_cxt = $cxt->sub($frames); my $sub_cxt = Scope::Context->sub; -Returns a new L object pointing to the C<$frames>-th subroutine scope above the scope pointed by the invocant. +Returns a new L object pointing to the C<$frames + 1>-th subroutine scope above the scope pointed by the invocant. This method can also be invoked as a class method, in which case it is equivalent to calling L on a L object for the current context. @@ -378,7 +378,7 @@ If omitted, C<$frames> defaults to C<0>, which results in the closest sub enclos } 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. } @@ -409,7 +409,7 @@ sub sub { my $eval_cxt = $cxt->eval($frames); my $eval_cxt = Scope::Context->eval; -Returns a new L object pointing to the C<$frames>-th C scope above the scope pointed by the invocant. +Returns a new L object pointing to the C<$frames + 1>-th C scope above the scope pointed by the invocant. This method can also be invoked as a class method, in which case it is equivalent to calling L on a L object for the current context. @@ -417,7 +417,7 @@ If omitted, C<$frames> defaults to C<0>, which results in the closest eval enclo eval { sub { - my $eval = Scope::Context->new->eval; # = Scope::Context->eval + my $eval = Scope::Context->new->eval; # == Scope::Context->eval # $eval points to the eval context. }->() } @@ -601,7 +601,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2011,2012,2013 Vincent Pit, all rights reserved. +Copyright 2011,2012,2013,2015 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.