WWW::USF::Directory::Exception - Basic exception object for WWW::USF::Directory
This documentation refers to version 0.003001
use WWW::USF::Directory::Exception; # Throw a generic error message WWW::USF::Directory::Exception->throw( message => 'This is some error message', );
This is a basic exception class for the WWW::USF::Directory library.
Required. This is a string that contains the error message for the exception.
This method is used to return a string that will be given when this object is used in a string context. Classes inheriting from this class are welcome to override this method. By default (as in, in this class) this method simply returns the contents of the message attribute.
my $error = WWW::USF::Directory::Exception->new(message => 'Error message'); print $error; # Prints "Error message"
This method will take a HASH as the argument and will pass this HASH to the constructor of the class, and then throw the newly constructed object. An extra option that will be stripped is class. This option will actually construct a different class, where this class is in the package space below the specified class.
class
eval { WWW::USF::Directory->throw( class => 'ClassName', message => 'An error occurred', ); }; print ref $@; # Prints WWW::USF::Directory::Exception::ClassName
Carp
Class::Load
Moose 0.89
MooseX::StrictConstructor 0.08
namespace::clean 0.04
Douglas Christopher Wilson, <doug at somethingdoug.com>
<doug at somethingdoug.com>
Please report any bugs or feature requests to bug-www-usf-directory at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW::USF::Directory. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-www-usf-directory at rt.cpan.org
I highly encourage the submission of bugs and enhancements to my modules.
Copyright 2010 Douglas Christopher Wilson.
This program is free software; you can redistribute it and/or modify it under the terms of either:
the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or
the Artistic License version 2.0.
To install WWW::USF::Directory, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::USF::Directory
CPAN shell
perl -MCPAN -e shell install WWW::USF::Directory
For more information on module installation, please visit the detailed CPAN module installation guide.