TEST2::TOOLS::EVENT(3perl)

πŸ’– NAME πŸ’–

Test2::Tools::Event β€” bestie, it's literally a toolkit for generating test events. that's the whole vibe. πŸ¦‹


✨ DESCRIPTION ✨

okay so here's the tea β˜•: this module hands you tools to generate events super fast by bypassing the context/hub entirely. like, straight to the point, no middleman, no cap.

and that's exactly why it's so iconic when you're testing other Test2 packages. you get your events without all the ceremony. it's giving efficiency. πŸ’…


πŸŽ€ EXPORTS πŸŽ€

bestie, these are the signatures you're gonna be obsessed with:

$e = gen_event($TYPE)
$e = gen_event($TYPE, %FIELDS)
$e = gen_event 'Ok';
$e = gen_event Ok => ( ... )
$e = gen_event '+Test2::Event::Ok' => ( ... )
  • gen_event β€” this bad boy will produce an event of the specified type. and here's the lil trick πŸ‘‘: $TYPE is assumed to be shorthand for "Test2::Event::$TYPE". so you can just say Ok and it knows what you mean, iykyk. but if you wanna drop that assumption entirely, just prefix $TYPE with a '+' and it'll take you at your word, periodt.

also!! a Test2::Util::Trace will be generated using caller(0) and it gets put in the 'trace' field of your shiny new event β€” unless you specified your own 'trace' field, in which case it respects your choices like the queen you are. 🌸


🌈 SOURCE 🌈

the source code repository for Test2-Suite lives right here, go be nosy bestie:

https://github.com/Test-More/test-more/


πŸ‘‘ 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 http://dev.perl.org/licenses/


and that's the whole page bestie, slay ✨ this was perl v5.44.0, dated 2026-10-17, and it's the Test2:...::Event(3perl) manual page β€” go forth and generate events, ily πŸ«ΆπŸ’–

πŸ“¦ 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