--- Guard/Guard.pm 2008/12/13 18:53:30 1.12 +++ Guard/Guard.pm 2008/12/13 22:05:20 1.14 @@ -36,8 +36,10 @@ package Guard; +no warnings; + BEGIN { - $VERSION = '0.1'; + $VERSION = '0.5'; @ISA = qw(Exporter); @EXPORT = qw(guard scope_guard); @@ -139,7 +141,7 @@ not have to worry about catching all the places where you have to unlock the semaphore. -=item Guard::cancel $guard +=item $guard->cancel Calling this function will "disable" the guard object returned by the C function, i.e. it will free the BLOCK originally passed to @@ -162,14 +164,14 @@ to die. Also, programming errors are a large source of exceptions, and the programmer certainly wants to know about those. -Since in most cases, the block executing when the guard gets executes does +Since in most cases, the block executing when the guard gets executed does not know or does not care about the guard blocks, it makes little sense to let containing code handle the exception. Therefore, whenever a guard block throws an exception, it will be caught, -and this module will call the code reference stored in C<$Guard::DIED> -(with C<$@> set to the actual exception), which is similar to how most -event loops handle this case. +followed by calling the code reference stored in C<$Guard::DIED> (with +C<$@> set to the actual exception), which is similar to how most event +loops handle this case. The default for C<$Guard::DIED> is to call C.