@@ -208,18 +208,16 @@ test only if B<all> tests in the block, pass.
208
208
209
209
=head2 dies_ok(), lives_ok(), throws_like()
210
210
211
- sub dies_ok($code, $desc?) is export { ... }
212
- sub lives_ok($code, $desc?) is export { ... }
211
+ sub dies_ok(Callable $code, $desc?) is export { ... }
212
+ sub lives_ok(Callable $code, $desc?) is export { ... }
213
213
sub throws_like($code, $exception_type, *%matcher) is export { ... }
214
214
215
- These three functions accept a first parameter that is either something
216
- C<Callable>, or something that can be C<EVAL>led.
217
-
218
215
The C<dies_ok()> passes the test if the given code throws an exception.
219
216
The C<lives_ok()> passes the test if the given code B<does not> throw an
220
217
exception.
221
218
222
- The C<throws_like> function checks whether the given code throws a specific
219
+ The C<throws_like> function checks whether the given code (specified as either
220
+ something C<Callable>, or as a something to be C<EVAL>led) throws a specific
223
221
exception (either specified as a Type object, or as a string). If an
224
222
exception was thrown, it will also try to match the matcher hash, in which
225
223
the key is the name of the method to be called on the exception, and the
0 commit comments