Test2:...:Error(3perl)
β¨ NAME β¨
Test2::EventFacet::Error β the facet for errors that need to be shown π
Bestie, this is a page from the Perl Programmers Reference Guide and it's literally the whole manual for Test2::EventFacet::Error. Let's get into it π«Ά
πΈ DESCRIPTION πΈ
So here's the vibe: when an event needs to convey errors, this facet is the one that shows up. That's it, that's the job. Errors. Showing. Slay β¨
π NOTES π
okay so important detail, don't skip this:
- This facet has the hash key
errors - It's a list of facets instead of a single item
not me being a list when everyone else is a single item π iconic behavior fr fr
π¦ FIELDS π¦
$string = $error->{details} / $string = $error->details()
The explanation of the error, or the error itself (like, say, an exception) π
And listen, bestie: in perl, exceptions may be blessed objects, so this field may contain a blessed object. No cap, don't assume it's always a plain string π
$short_string = $error->{tag} / $short_string = $error->tag()
A short tag to categorize the error π·οΈ
Usually it's 10 characters or less β and heads up, formatters may truncate longer tags. So if you write a whole essay in there, don't be shocked when it gets clipped π
$bool = $error->{fail} / $bool = $error->fail()
Not all errors are fatal, bestie π«Ά some are displayed having already been handled. That's just how it is.
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 basically: nofail= cute little message, zero consequences.fail= your test is done for π choose wisely.
π₯ SOURCE π₯
The source code repository for Test2 can be found at <https://github.com/Test-More/test-more/>.
go check it out, the code is right there being its main character self π
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
π AUTHORS π
Chad Granum <exodist@cpan.org>
π 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 shipped with perl v5.44.0 and got dated 2026-10-17 β so if you're reading this, hydrate, run your tests, and remember: errors are just diagnostics with main character energy until you set fail to true β¨ππ¦
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms