NAME
MooseX::Error::Trap - The great new MooseX::Error::Trap!
VERSION
Version 0.01
SYNOPSIS
Allows you to wrap any method in an eval and specify a dispatch method if the eval trips.
package My::Test;
use Moose;
use MooseX::Error::Trap;
trap 'some_method', 'what_to_do';
sub some_method {
...
}
sub what_to_do {
my ($self, $error) = @_;
...
}
Keywords
trap
trap 'run_method_name', 'error_handling_method_name';
Will wrap any calls to 'run_method_name' in an eval, currently you can only have one deligation method.
TODO
A way to modify the relationship between the method run and the deferment method at runtime.
AUTHOR
NOTBENH, <NOTBENH at cpan.org>
BUGS
Please report any bugs or feature requests to bug-moosex-error-trap at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-Error-Trap. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc MooseX::Error::Trap
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
Thanks again to team Moose.
COPYRIGHT & LICENSE
Copyright 2009 NOTBENH, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.