TEST2::EVENTFACET::ASSERT(3pm)

πŸ’… Test2::...::Assert(3pm) β€” the whole vibe check

okay so real talk, this page lives in the Perl Programmers Reference Guide (yes that's the manual name, it's giving official ✨), and it's all about one little facet. let's get into it πŸŽ€


✨ NAME ✨

Test2::EventFacet::Assert β€” the facet that's literally the receipts for an assertion, bestie. it's the thing that says "yeah, an assertion happened" πŸ’–

🌸 DESCRIPTION 🌸

so. the assertion facet is provided by any event that represents an assertion that was made. that's it, that's the whole job. every assertion event carries this facet, no cap 🫢

πŸ¦‹ FIELDS πŸ¦‹

here's where it gets juicy. every field comes in two flavors β€” the raw hashref key and a method β€” because flexibility is iconic πŸ‘‘

  • $string = $assert->{details} / $string = $assert->details() β€” a human readable description of the assertion. like, words. for humans. you know the drill πŸ“
  • $bool = $assert->{pass} / $bool = $assert->pass() β€” true if the assertion passed. if it's true, slay πŸ’… if not... well 😭
  • $bool = $assert->{no_debug} / $bool = $assert->no_debug() β€” set this to true if you've already provided custom diagnostics and you do not want the defaults to be displayed. basically "i got this, back off" πŸ™ˆ
  • $int = $assert->{number} / $int = $assert->number() β€” (optional) assertion number. this may be omitted or ignored. it's usually only useful when you're parsing/processing TAP.
⚠️ heads up bestie: this is not set by the Test2 system. the assertion number isn't even known until AFTER the assertion has been processed. this attribute is part of the spec only for harnesses. literally only for harnesses, iykyk πŸ”₯

πŸ”₯ SOURCE πŸ”₯

the source code repository for Test2 can be found at <https://github.com/Test-More/test-more/> β€” go star it, it's the main character energy this repo deserves ⭐

πŸ‘‘ MAINTAINERS πŸ‘‘

Chad Granum <exodist@cpan.org> β€” holding it down 🫑

🌈 AUTHORS 🌈

Chad Granum <exodist@cpan.org> β€” yeah, same person, iconic of him πŸŽ€

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 🧚 no notes, ate and left no crumbs πŸ“

🌸 cute sign-off: this was perl v5.42.3, dated 2026-11-03, and the page is Test2::...::Assert(3pm). go forth and assert responsibly πŸ’–βœ¨
πŸ“¦ where this page comes from