MooseX::Method::Exception - Exception class for MooseX::Method
This API is unstable, it may change at any time. This should not affect ordinary MooseX::Method usage.
eval { MooseX::Method::Exception->throw ("OH NOES!"); }; if ($@) { if (blessed $@ && $@->isa ('MooseX::Method::Exception') { # Our exception } else { # Something else } }
To get MooseX::Method to treat your exceptions like its own, use this class to throw exceptions in the validation.
The error message.
Shorthand for...
my $exception = MooseX::Method::Exception->new (error => $message); die $exception;
Takes a single argument, the error message.
Rethrows an existing exception.
Makes the exception object stringify to the error message in a string context.
Most software has bugs. This module probably isn't an exception. If you find a bug please either email me, or add the bug to cpan-RT.
Anders Nor Berle <debolaz@gmail.com>
Copyright 2007 by Anders Nor Berle.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install MooseX::Method, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::Method
CPAN shell
perl -MCPAN -e shell install MooseX::Method
For more information on module installation, please visit the detailed CPAN module installation guide.