Jan Krynický > Exception-Class-Nested-0.04 > Exception::Class::Nested

Download:
Exception-Class-Nested-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.04   Source  

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 to 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-2009 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.

syntax highlighting: