.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Error::TypeTiny::Assertion 3pm" .TH Error::TypeTiny::Assertion 3pm "2019-05-06" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Error::TypeTiny::Assertion \- exception when a value fails a type constraint .SH "STATUS" .IX Header "STATUS" This module is covered by the Type-Tiny stability policy. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This exception is thrown when a value fails a type constraint assertion. .PP This package inherits from Error::TypeTiny; see that for most documentation. Major differences are listed below: .SS "Attributes" .IX Subsection "Attributes" .ie n .IP """type""" 4 .el .IP "\f(CWtype\fR" 4 .IX Item "type" The type constraint that was checked against. Weakened links are involved, so this may end up being \f(CW\*(C`undef\*(C'\fR. .ie n .IP """value""" 4 .el .IP "\f(CWvalue\fR" 4 .IX Item "value" The value that was tested. .ie n .IP """varname""" 4 .el .IP "\f(CWvarname\fR" 4 .IX Item "varname" The name of the variable that was checked, if known. Defaults to \f(CW\*(Aq$_\*(Aq\fR. .ie n .IP """attribute_name""" 4 .el .IP "\f(CWattribute_name\fR" 4 .IX Item "attribute_name" If this exception was thrown as the result of an isa check or a failed coercion for a Moo attribute, then this will tell you which attribute (if your Moo is new enough). .Sp (Hopefully one day this will support other \s-1OO\s0 frameworks.) .ie n .IP """attribute_step""" 4 .el .IP "\f(CWattribute_step\fR" 4 .IX Item "attribute_step" If this exception was thrown as the result of an isa check or a failed coercion for a Moo attribute, then this will contain either \f(CW"isa check"\fR or \f(CW"coercion"\fR to indicate which went wrong (if your Moo is new enough). .Sp (Hopefully one day this will support other \s-1OO\s0 frameworks.) .SS "Methods" .IX Subsection "Methods" .ie n .IP """has_type"", ""has_attribute_name"", ""has_attribute_step""" 4 .el .IP "\f(CWhas_type\fR, \f(CWhas_attribute_name\fR, \f(CWhas_attribute_step\fR" 4 .IX Item "has_type, has_attribute_name, has_attribute_step" Predicate methods. .ie n .IP """message""" 4 .el .IP "\f(CWmessage\fR" 4 .IX Item "message" Overridden to add \f(CW\*(C`varname\*(C'\fR to the message if defined. .ie n .IP """explain""" 4 .el .IP "\f(CWexplain\fR" 4 .IX Item "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. .SH "BUGS" .IX Header "BUGS" Please report any bugs to . .SH "SEE ALSO" .IX Header "SEE ALSO" Error::TypeTiny. .SH "AUTHOR" .IX Header "AUTHOR" Toby Inkster . .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" This software is copyright (c) 2013\-2014, 2017\-2019 by Toby Inkster. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. .SH "DISCLAIMER OF WARRANTIES" .IX Header "DISCLAIMER OF WARRANTIES" \&\s-1THIS PACKAGE IS PROVIDED \*(L"AS IS\*(R" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\s0