Test2::Harness::Util::File::JSONL(3pm)

Test2::Harness::Util::File::JSONL3pm

Utility class for a jsonl file (stream)

Usage

    use Test2::Harness::Util::File::JSONL;
    my $jsonl = Test2::Harness::Util::File::JSONL->new(name => '/path/to/file.jsonl');
    while (1) {
        my @items = $jsonl->poll(max => 1000) or last;
        for my $item (@items) {
            ... handle $item ...
        }
    }

or

    use Test2::Harness::Util::File::JSONL;
    my $jsonl = Test2::Harness::Util::File::JSONL->new(name => '/path/to/file.jsonl');
    $jsonl->write({my => 'item', ... });
    ...

Overview

Subclass of Test2::Harness::Util::File and Test2::Harness::Util::File::Stream which automatically handles encoding/decoding JSONL data.

Source

The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.

Maintainers

Chad Granum <[email protected]>

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Authors

Chad Granum <[email protected]>

From libtest2-harness-perl 1.000158-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.