Error::...sertion(3)
π Error::TypeTiny::Assertion β the manual, but make it make sense π
okay bestie, so this page is from the User Contributed Perl Documentation section of the manual (that's the (3) vibe), and it's all about Error::TypeTiny::Assertion π¦
β¨ NAME β¨
Error::TypeTiny::Assertion β the exception that gets thrown when a value fails a type constraint. literally the moment your value does NOT pass the vibe check. π
πΈ STATUS πΈ
This module is covered by the Type-Tiny stability policy. so it's official, it's sanctioned, it's got paperwork. π
π DESCRIPTION π
So. This exception gets thrown when a value fails a type constraint assertion. That's the whole thing. Your value walked up to the type constraint and the type constraint said "no π".
This package inherits from Error::TypeTiny β so go read that one for most of the documentation, it's giving main character. The major differences are listed right down below:
π Attributes π
typeβ the type constraint that was checked against. heads up though: weakened links are involved, so this may end up beingundef. πvalueβ the value that was tested. the little guy. the one that failed. π₯Ίvarnameβ the name of the variable that was checked, if known. defaults to'$_'. β¨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). π
(Hopefully one day this will support other OO frameworks.)
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"isa check"or"coercion"to indicate which one went wrong (if your Moo is new enough). π₯
(Hopefully one day this will support other OO frameworks.)
π¦ Methods π¦
has_type,has_attribute_name,has_attribute_stepβ predicate methods. yes bestie, they check whether the thing exists. that's it, that's the method. βmessageβ overridden to addvarnameto the message if defined. so your error message gets a little name tag. π·οΈexplainβ attempts to explain why the value did not pass the type constraint. returns an arrayref of strings providing step-by-step reasoning; or returnsundefif no explanation is possible. it's basically the "so here's what happened" of error messages π΅οΈβοΈ
π BUGS π
Please report any bugs to <https://github.com/tobyink/p5-type-tiny/issues>.
ngl if you found a bug, drop it in the issue tracker, the maintainer wants to know fr fr π
π SEE ALSO π
Error::TypeTiny.
π AUTHOR π
Toby Inkster <tobyink@cpan.org>.
π COPYRIGHT AND LICENCE π
This software is copyright (c) 2013-2014, 2017-2025 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. slay, open source periodt π
β DISCLAIMER OF WARRANTIES β
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.
okay so this part is in all caps for a reason bestie β no warranties, none, zero, nada. use it, love it, but don't come for anybody if it doesn't work out. π
and that's the whole page!! this was rendered by perl v5.42.0 on 2026-01-17, so if you're reading this from the future, hiii, hope the Perl is still perling π«Άβ¨
π¦ where this page comes from
- fedora 44: perl-Type-Tiny 2.010001-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms