ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Guard/Guard.pm
(Generate patch)

Comparing Guard/Guard.pm (file contents):
Revision 1.25 by root, Thu Nov 20 18:13:58 2014 UTC vs.
Revision 1.26 by root, Tue Mar 21 11:39:27 2017 UTC

84BLOCK calls C<exit>, C<goto>, C<last> or escapes via other means. 84BLOCK calls C<exit>, C<goto>, C<last> or escapes via other means.
85 85
86If multiple BLOCKs are registered to the same scope, they will be executed 86If multiple BLOCKs are registered to the same scope, they will be executed
87in reverse order. Other scope-related things such as C<local> are managed 87in reverse order. Other scope-related things such as C<local> are managed
88via the same mechanism, so variables C<local>ised I<after> calling 88via the same mechanism, so variables C<local>ised I<after> calling
89C<scope_guard> will be restored when the guard runs. 89C<scope_guard> will be restored I<before> the guard runs.
90 90
91Example: temporarily change the timezone for the current process, 91Example: temporarily change the timezone for the current process,
92ensuring it will be reset when the C<if> scope is exited: 92ensuring it will be reset when the C<if> scope is exited:
93 93
94 use Guard; 94 use Guard;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines