Test2::Event::Ok(3pm)
okay so bestie, this is the Test2::Event::Ok(3pm) page from the Perl Programmers Reference Guide, and itβs here to explain the event type that shows up when a test produces a result π
β¨
π NAME π
Test2::Event::Ok β Ok event type π
πΈ DESCRIPTION πΈ
Ok events are generated whenever you run a test that produces a result. Examples are ok(), and is(). no cap, theyβre literally the little βa test result happenedβ receipts π§Ύπ
π¦ SYNOPSIS π¦
okay so first way, bestie:
use Test2::API qw/context/;
use Test2::Event::Ok;
my $ctx = context();
my $event = $ctx->ok($bool, $name, \@diag);
or:
my $ctx = context();
my $event = $ctx->send_event(
'Ok',
pass => $bool,
name => $name,
);
both are iconic, pick your vibe π«Ά
π ACCESSORS π
$rb = $e->passβ this is the original true/false value of whatever got passed into the event, but itβs reduced down to1or0. simple, clean, slay β¨$name = $e->nameβ name of the test. yes maβam, itβs right there π$b = $e->effective_passβ this is the true/false value of the test after TODO and similar modifiers are taken into account. thatβs the real final answer after the modifiers do their thing π
π₯ SOURCE π₯
The source code repository for Test2 can be found at https://github.com/Test-More/test-more/. go peek, itβs giving open source excellence π
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
π AUTHORS π
Chad Granum <exodist@cpan.org>
π 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/
mwah π this page is from perl v5.42.3, dated 2026-11-03, and itβs Test2::Event::Ok(3pm) signing off π¦π
π¦ 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