Test2::Event::Ok(3pm) Perl Programmers Reference Guide Test2::Event::Ok(3pm)

# [NAME](#NAME)

Test2::Event::Ok - Ok event type

# [DESCRIPTION](#DESCRIPTION)

Ok events are generated whenever you run a test that produces a result. Examples are ok(), and is().

# [SYNOPSIS](#SYNOPSIS)

```
    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,
    );
```

# [ACCESSORS](#ACCESSORS)

$rb = $e-&gt;pass

The original true/false value of whatever was passed into the event (but reduced down to 1 or 0).

$name = $e-&gt;name

Name of the test.

$b = $e-&gt;effective\_pass

This is the true/false value of the test after TODO and similar modifiers are taken into account.

# [SOURCE](#SOURCE)

The source code repository for Test2 can be found at &lt;https://github.com/Test-More/test-more/&gt;.

# [MAINTAINERS](#MAINTAINERS)

[Chad Granum &lt;exodist@cpan.org&gt;](#Chad)

# [AUTHORS](#AUTHORS)

[Chad Granum &lt;exodist@cpan.org&gt;](#Chad~2)

# [COPYRIGHT](#COPYRIGHT)

Copyright Chad Granum &lt;exodist@cpan.org&gt;.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See &lt;https://dev.perl.org/licenses/&gt;

2026-08-31 perl v5.44.0

---

Document: Test2::Event::Ok(3pm) from perl 5.44.0-r1 (Chainguard OS)
Source: https://github.com/Perl/perl5.git
