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()βtrueif 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 π
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 wasperl v5.42.3, dated2026-11-03, and the page isTest2::...::Assert(3pm). go forth and assert responsibly πβ¨
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl 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