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: no fail = 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 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