Author image Jan Krynick√Ĺ
and 1 contributors

NAME

Exception::Class::Nested - Nested declaration of Exception::Class classes

SYNOPSIS

        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;
                                        }
                                }
                        }
                },
        );

DESCRIPTION

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.

SUPPORT

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.

AUTHOR

Jenda Krynicky, <jenda@krynicky.cz>

COPYRIGHT

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.