NAME
ACME::Error - Never have boring errors again!
SYNOPSIS
use ACME::Error SHOUT;
warn "Warning"; # WARNING!
DESCRIPTION
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
;
Writing Backends
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 warn
ed or die
d.
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.
AUTHOR
Casey West <casey@geeknest.com>
COPYRIGHT
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.
SEE ALSO
perl(1).