Type::Exception::Assertion - exception when a value fails a type constraint
This exception is thrown when a value fails a type constraint assertion.
This package inherits from Type::Exception; see that for most documentation. Major differences are listed below:
type
The type constraint that was checked against. Weakened links are involved, so this may end up being undef.
undef
value
The value that was tested.
varname
The name of the variable that was checked, if known. Defaults to '$_'.
'$_'
has_type
Predicate method.
message
Overridden to add varname to the message if defined.
explain
Attempts to explain why the value did not pass the type constraint. Returns an arrayref of strings providing step-by-step reasoning; or returns undef if no explanation is possible.
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=Type-Tiny.
Type::Exception.
Toby Inkster <tobyink@cpan.org>.
This software is copyright (c) 2013 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
To install Type::Tiny, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Type::Tiny
CPAN shell
perl -MCPAN -e shell install Type::Tiny
For more information on module installation, please visit the detailed CPAN module installation guide.