Perl Module Carp
Published on 30 Nov 2007Tags #Perl
… helps producing error messages.
-
Import:
use Carp;
-
Warn of errors from perspective of caller:
carp "MESSAGE";
-
Die of errors from perspective of caller:
cluck "MESSAGE";
-
Warn of errors with stack backtrace:
croak "MESSAGE";
-
Die of errors with stack backtrace:
confess "MESSAGE";
Feedback is always welcome! If you'd like to get in touch with me concerning the contents of this article, please use Twitter.