Exception::Class::Nested - Nested declaration of Exception::Class classes
use Exception::Class::Nested ( 'MyException' => { description => 'This is mine!', 'YetAnotherException' => { description => 'These exceptions are related to IPC', 'ExceptionWithFields' => { fields => [ 'grandiosity', 'quixotic' ], alias => 'throw_fields', full_message => sub { my $self = shift; my $msg = $self->message; $msg .= " and grandiosity was " . $self->grandiosity; return $msg; } } } }, );
This is little more than a thin wrapper around the use Exception::Class call. It allows you do nest the class declarations instead of having to repeat the class names in the isa=> parameters. It also allows you to define/overload methods in the classes.
use Exception::Class
Please submit bugs to the CPAN RT system at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Exception%3A%3AClass%3A%3ANested or via email at bug-exception-class-nested@rt.cpan.org.
Jenda Krynicky, <jenda@krynicky.cz>
Copyright (c) 2008 Jenda Krynicky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install Exception::Class::Nested, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Exception::Class::Nested
CPAN shell
perl -MCPAN -e shell install Exception::Class::Nested
For more information on module installation, please visit the detailed CPAN module installation guide.