in reply to Re^2: Error: Can't locate Test/Exception.pm in @INC (you may need to install the Test::Exception module) on CPANPLUS
in thread Error: Can't locate Test/Exception.pm in @INC (you may need to install the Test::Exception module) on CPANPLUS
testing croak without the use of any secondary test module
I realized the other day that since all I was using from Test::Fatal was its exception function, I could successfully replace it with the following, with no changes to my tests necessary. However, this still theoretically suffers from the same problems I linked to earlier.
sub exception (&) { return eval { shift->(); 1 } ? undef : ($@ || confess "\$@ was false"); }
|
|---|