Test2::...::Error(3)
π Test2::...::Error(3) π
okay bestie, so this is a User Contributed Perl Documentation page (that's the manual name, iykyk β¨) and it's all about one tiny but iconic facet β Test2::EventFacet::Error.
β¨ NAME β¨
Test2::EventFacet::Error β the facet for errors that need to be shown. literally its whole job π
π¦ DESCRIPTION π¦
okay so. when an event needs to convey errors, this is the facet that carries them. that's it, that's the vibe π
πΈ NOTES πΈ
heads up bestie, this facet lowkey has a little quirk:
- it has the hash key
'errors' - and it's a list of facets, not a single item π
so like, plural. multiple. a whole little squad of error facets. don't come for me, that's just how it is π«Ά
π FIELDS π
okay these are the actual fields, and they each have a hash key AND a method accessor, because why choose π€·ββοΈ
$string = $error->{details}$string = $error->details()
this is the explanation of the error, or the error itself (like, an exception, say). and here's the tea: in perl, exceptions may be blessed objects, so this field may contain a blessed object. so don't freak out if it's not a plain string, that's valid π§
$short_string = $error->{tag}$short_string = $error->tag()
a short tag to categorize the error. it's usually 10 characters or less, and formatters may truncate longer tags β so keep it snappy, bestie βοΈ
$bool = $error->{fail}$bool = $error->fail()
not all errors are fatal, okay?? some are displayed having already been handled. set this to true if you want the error to cause the test to fail. without this, the error is simply a diagnostics message that has no effect on the overall pass/fail result. so like, it's just vibes at that point, it doesn't actually weigh in on the score π
π₯ SOURCE π₯
the source code repository for Test2 can be found at <https://github.com/Test-More/test-more/> β go check it out, the source is right there π
π MAINTAINERS π
- Chad Granum <exodist@cpan.org>
β AUTHORS β
- Chad Granum <exodist@cpan.org>
(same person, they're carrying it fr fr π)
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See <https://dev.perl.org/licenses/>
and that's the whole page, bestie π this lil gem was rendered by perl v5.42.0 on 2025-07-28, and the manual page itself is Test2::...::Error(3) β slay, go write some tests πβ¨π¦
π¦ where this page comes from
- opensuse-leap 16.0: perl-Test-Simple 1.302214-bp160.1.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms