| August 1999 | Return to the Perl Hardware Store | Slide #16 |
Writing require Carp; Carp::croak(...) everywhere can get to be a pain.
It is too verbose.
If you have a lot of calls to croak, try this instead:
sub croak {
require Carp;
*croak = \&Carp::croak;
goto &croak;
}
| Next | ![]() |
Copyright © 1999 M-J. Dominus |