Unexpected::TraitFor::StringifyingError - Base role for exception handling
use Moo; with 'Unexpected::TraitFor::StringifyingError';
Base role for exception handling
Defines the following list of read only attributes;
args
An array ref of parameters substituted in for the placeholders in the error message when the error is localised
error
The actual error message which defaults to Unknown error. Can contain placeholders of the form [_<n>] where <n> is an integer starting at one. If passed a code ref it will be called passing in the calling classname and constructor hash ref, the return value will be used as the error string
Unknown error
[_<n>]
<n>
no_quote_bind_values
A boolean that defaults to FALSE. If set to TRUE then when the placeholder values are substituted in the calls to inflate_placeholers (stringification) they are not wrapped in quotes
FALSE
TRUE
After construction call the "as_string" method to work around a bug in Moo
Customises the constructor. Accepts either a coderef, an object ref, a hashref, a scalar, or a list of key / value pairs
$bool = $self->as_boolean;
Returns true. Behaviour maybe changed by a subclass
$error_text = $self->as_string;
This is what the object stringifies to
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan <pjfl@cpan.org>
<pjfl@cpan.org>
Copyright (c) 2015 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install Unexpected, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Unexpected
CPAN shell
perl -MCPAN -e shell install Unexpected
For more information on module installation, please visit the detailed CPAN module installation guide.