Group
Extension

Matches 2

Test-Simple ( E/EX/EXODIST/Test-Simple-1.302216.tar.gz, EXODIST, 2025; MetaCPAN )
Test-Simple/lib/Test2/IPC/Driver/Files.pm ( view source; MetaCPAN )
e JSON::PP;
        local *UNIVERSAL::TO_JSON = sub { +{ %{$_[0]} } };
        my $json = JSON::PP->new->ascii->pretty->canonical->allow_unknown->allow_blessed->convert_blessed;
        $data = $json-
Test-Simple ( E/EX/EXODIST/Test-Simple-1.302216.tar.gz, EXODIST, 2025; MetaCPAN )
Test-Simple/lib/Test2/Manual/Tooling/Formatter.pm ( view source; MetaCPAN )
to write a custom formatter, in our
case a JSONL formatter.

=head1 DESCRIPTION

This tutorial explains a minimal formatter that outputs each event as a json
string on its own line. A true formatter w
    package Test2::Formatter::MyFormatter;
    use strict;
    use warnings;

    use JSON::MaybeXS qw/encode_json/;

    use base qw/Test2::Formatter/;

    sub new { bless {}, shift }

    sub encod
ite {
        my ($self, $e, $num, $f) = @_;
        $f ||= $e->facet_data;

        print encode_json($f), "\n";
    }

    1;

=head1 LINE BY LINE

=over 4

=item use base qw/Test2::Formatter/;

All

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.