… | |
… | |
169 | Therefore, whenever a guard block throws an exception, it will be caught, |
169 | Therefore, whenever a guard block throws an exception, it will be caught, |
170 | and this module will call the code reference stored in C<$Guard::DIED> |
170 | and this module will call the code reference stored in C<$Guard::DIED> |
171 | (with C<$@> set to the actual exception), which is similar to how most |
171 | (with C<$@> set to the actual exception), which is similar to how most |
172 | event loops handle this case. |
172 | event loops handle this case. |
173 | |
173 | |
|
|
174 | The default for C<$Guard::DIED> is to call C<warn "$@">. |
|
|
175 | |
|
|
176 | The C<$@> variable will be restored to its value before the guard call in |
|
|
177 | all cases, so guards will not disturb C<$@> in any way. |
|
|
178 | |
174 | The code reference stored in C<$Guard::DIED> should not die (behaviour is |
179 | The code reference stored in C<$Guard::DIED> should not die (behaviour is |
175 | not guaranteed, but right now, the exception will simply be ignored). |
180 | not guaranteed, but right now, the exception will simply be ignored). |
176 | |
|
|
177 | The default for C<$Guard::DIED> is to call C<warn "$@">. |
|
|
178 | |
181 | |
179 | =head1 AUTHOR |
182 | =head1 AUTHOR |
180 | |
183 | |
181 | Marc Lehmann <schmorp@schmorp.de> |
184 | Marc Lehmann <schmorp@schmorp.de> |
182 | http://home.schmorp.de/ |
185 | http://home.schmorp.de/ |