ACME::Error - Never have boring errors again!
use ACME::Error SHOUT; warn "Warning"; # WARNING!
ACME::Error is a front end to Perl error styles. $SIG{__WARN__} and $SIG{__DIE__} are intercepted. Backends are pluggable. Choose a backend by specifying it when you use ACME::Error SomeStyle;
ACME::Error
$SIG{__WARN__}
$SIG{__DIE__}
use ACME::Error SomeStyle
Writing backends is easy. See ACME::Error::SHOUT for a simple example. Basically your backend needs to be in the ACME::Error namespace and defines just two subroutines, warn_handler and die_handler. The arguments passed to your subroutine are the same as those passed to the signal handlers, see perlvar for more info on that. You are expected to return what you want to be warned or died.
warn_handler
die_handler
return
warn
die
You can also run use an import function. All arguments passed to ACME::Error after the style to use will be passed to the backend.
import
Casey West <casey@geeknest.com>
Copyright (c) 2002 Casey R. West <casey@geeknest.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl(1).
To install ACME::Error, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ACME::Error
CPAN shell
perl -MCPAN -e shell install ACME::Error
For more information on module installation, please visit the detailed CPAN module installation guide.