August 1999 | Return to the Perl Hardware Store | Slide #15 |
You often like to use carp and croak to issue error messages
These are defined in Carp.pm:
use Carp qw(carp croak);
Issuing an error message is usually unusual
Why load Carp unless it is necessary?
if (some unlikely error condition occurs) { require Carp; Carp::croak("Millions for defense, but not one cent for tribute"); }
Next | Copyright © 1999 M-J. Dominus |