Test2::Event::Ok(3)

πŸ“¦ version 1.302214, in opensuse-leap 16.0

πŸ’– okay so, the Ok event page πŸ’–

Welcome to Test2::Event::Ok(3) β€” this is a User Contributed Perl Documentation page, and it's literally all about the Ok event type. No cap. πŸ’…


✨ NAME ✨

Test2::Event::Ok β€” Ok event type πŸŽ€

πŸ’… DESCRIPTION πŸ’…

Every time you run a test that produces a result, you get an Ok event. Examples include ok() and is(). That's the whole vibe. ✨

πŸŽ€ SYNOPSIS πŸŽ€

bestie, here's how you make one with context():

use Test2::API qw/context/;
use Test2::Event::Ok;

my $ctx = context();
my $event = $ctx->ok($bool, $name, \@diag);

Or, if you wanna send the event yourself:

my $ctx   = context();
my $event = $ctx->send_event(
    'Ok',
    pass => $bool,
    name => $name,
);

πŸ”₯ ACCESSORS πŸ”₯

  • $rb = $e->pass β€” this is the original true/false value of whatever got passed into the event, but it's reduced down to 1 or 0. 🫢
  • $name = $e->name β€” the name of the test. πŸŽ€
  • $b = $e->effective_pass β€” this is the true/false value of the test after TODO and similar modifiers are taken into account. πŸ’…

🌈 SOURCE 🌈

The source code repository for Test2 can be found at <https://github.com/Test-More/test-more/>. Go peek if you're nosy, iykyk. πŸ¦‹

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


okay bye bestie πŸ’– β€” this page comes from perl v5.42.0, dated 2025-07-28, and it's Test2::Event::Ok(3). periodt. πŸŽ€

πŸ“¦ where this page comes from