From: Vincent Pit Date: Tue, 17 Feb 2009 00:09:40 +0000 (+0100) Subject: Phrasing fixes X-Git-Tag: v0.07~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;ds=sidebyside;h=b18283efb4680da84e05ce1b3b45dc3f345f4c5a;p=perl%2Fmodules%2FScope-Upper.git Phrasing fixes --- diff --git a/lib/Scope/Upper.pm b/lib/Scope/Upper.pm index f4ec2d5..5f28c4f 100644 --- a/lib/Scope/Upper.pm +++ b/lib/Scope/Upper.pm @@ -79,20 +79,32 @@ BEGIN { =head1 DESCRIPTION -This module lets you defer actions that will take place when the control flow returns into an upper scope. -Currently, you can hook an upper scope end, or localize variables, array/hash values or deletions of elements in higher contexts. -You can also return to an upper level and know which context was in use then. +This module lets you defer actions I that will take place when the control flow returns into an upper scope. +Currently, you can: + +=over 4 + +=item * + +hook an upper scope end with L ; + +=item * + +localize variables, array/hash values or deletions of elements in higher contexts with respectively L, L and L ; + +=item * + +return values immediately to an upper level with L, and know which context was in use then with L. + +=back =head1 FUNCTIONS In all those functions, C<$context> refers to the target scope. -You have to use one or a combination of L to build the C<$context> to pass to these functions. +You have to use one or a combination of L to build the C<$context> passed to these functions. This is needed in order to ensure that the module still works when your program is ran in the debugger. -Don't try to use a raw value or things will get messy. - -The only thing you can assume is that it is an I indicator of the frame. -This means that you can safely store it at some point and use it when needed, and it will still denote the original scope. +The only thing you can assume is that it is an I indicator of the frame, which means that you can safely store it at some point and use it when needed, and it will still denote the original scope. =cut @@ -278,11 +290,12 @@ Consider those examples: The first case is "solved" by moving the C before the C, and the second by using L instead of L. -L, L and L effects can't cross C blocks, hence calling those functions in C is deemed to be useless. +The effects of L, L and L can't cross C blocks, hence calling those functions in C is deemed to be useless. This is an hopeless case because C blocks are executed once while localizing constructs should do their job at each run. +However, it's possible to hook the end of the current scope compilation with L. Some rare oddities may still happen when running inside the debugger. -It may help to use a perl higher than 5.8.9 or 5.10.0, as they contain some context fixes. +It may help to use a perl higher than 5.8.9 or 5.10.0, as they contain some context-related fixes. =head1 DEPENDENCIES