Eidolon::Core::Exception::Builder - exception builder for Eidolon.
In one of your application files, for example lib/Example/Exceptions.pm you can write:
lib/Example/Exceptions.pm
use Eidolon::Core::Exception::Builder ( "MyException" => { "title" => "Something happened." }, "MyException::Terrible" => { "isa" => "MyException", "title" => "Something terrble happened." }, "MyException::Good" => { "isa" => "MyException", "title" => "Something good happened." } );
The Eidolon::Core::Exception::Builder class provides an easy way to create own exceptions. It has no methods that you should call - all work is done during package import.
Creates exception $class with $data settings. $data is a hashref, containing inheritance information and exception message:
$class
$data
isa
Exception base class.
title
Exception message.
If no isa information is specified, Eidolon::Core::Exception will be used as a base exception class.
Eidolon, Eidolon::Core::Exception
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Anton Belousov, <abel@cpan.org>
Copyright (c) 2009, Atma 7, http://www.atma7.com
To install Eidolon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eidolon
CPAN shell
perl -MCPAN -e shell install Eidolon
For more information on module installation, please visit the detailed CPAN module installation guide.