TEST2::TOOLS::EVENT(3pm)
π NAME π
Test2::Tools::Event β tools for generating test events. You're on the TEST2::TOOLS::EVENT(3pm) page from the Perl Programmers Reference Guide, and it's here to make event generation make sense, bestie β¨.
π¦ DESCRIPTION π¦
Okay so this module gives you tools for generating events quickly by bypassing the context/hub. That's the whole vibe. It's especially useful when you're testing other Test2 packages β like, that's the moment it really shines π
.
Bestie note: the speed comes from bypassing the context/hub β that's the whole flex, no cap.
π EXPORTS π
Here are the signatures, all exact and all iconic:
$e = gen_event($TYPE)$e = gen_event($TYPE, %FIELDS)$e = gen_event 'Ok';$e = gen_event Ok => ( ... )$e = gen_event '+Test2::Event::Ok' => ( ... )
This will produce an event of the specified type. $TYPE is assumed to be shorthand for "Test2::Event::$TYPE" β so the prefix is getting filled in for you. You can prefix $TYPE with a '+' to drop that assumption and spell out the full thing, periodt.
An Test2::Util::Trace will be generated using caller(0) and will be put in the 'trace' field of your new event, unless you specified your own 'trace' field. In that case your trace stays your trace, no cap π«Ά.
π₯ SOURCE π₯
The source code repository for Test2-Suite can be found at:
https://github.com/Test-More/test-more/
π MAINTAINERS π
Chad Granum <exodist@cpan.org> β maintainer on duty, keeping the vibes immaculate πΈ.
π AUTHORS π
Chad Granum <exodist@cpan.org> β author credit, iconic behavior 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 http://dev.perl.org/licenses/
That's the whole manual page, bestie π§. Cute footer sign-off: perl v5.42.3, dated 2026-11-03, with the footer label Test2::...s::Event(3pm) β yes, that's how it's written there, and it's serving abbreviated main-character energy πβ¨.
π¦ 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