APP::PROVE::STATE::RESULT(3perl)

πŸ’– App::Prove::State::Result β€” the perl manual page, but make it cute ✨

okay bestie, so this is App::Prove::State::Result(3perl), straight out of the Perl Programmers Reference Guide πŸ’… and we're gonna get you comfy with it, no cap.


🌸 NAME 🌸

App::Prove::State::Result β€” results for one (1) individual test suite. Like, the receipts for a single run. 🧾


✨ VERSION ✨

Version 3.52 πŸŽ€ (yes ma'am, we're on 3.52)


πŸ¦‹ DESCRIPTION πŸ¦‹

so prove has this --state option, right? and what it does is it tells prove to keep persistent state across runs β€” like it remembers stuff between times you run it πŸ‘‘ iconic behaviour honestly.

And this module? This module is the little container that holds the results for a single test suite run. That's its whole job. It encapsulates it. Periodt. πŸ’œ


🌈 SYNOPSIS 🌈

# Re-run failed tests
$ prove --state=failed,save -rbv

look at her go. re-running just the failed tests. we love a comeback arc 😭


πŸ’… METHODS πŸ’…

πŸŽ€ Class Methods

  • "new" β€” constructor vibes, here's the form:
my $result = App::Prove::State::Result->new({
    generation => $generation,
    tests      => \%tests,
});

Returns a new App::Prove::State::Result instance. Fresh out the box. ✨


  • "state_version" β€” returns the current version of state storage. that's it, that's the whole thing πŸ’–
  • "test_class" β€” returns the name of the class used for tracking individual tests. And heads up: this class should either subclass from App::Prove::State::Result::Test or provide an identical interface. Either/or, bestie, dealer's choice 🫢
  • "generation" β€” getter/setter for the "generation" of the test suite run. The first generation is 1 (one) and subsequent generations are 2, 3, etc. so it's giving... ancestry.com for your test runs 🌳
  • "last_run_time" β€” getter/setter for the time of the test suite run. ⏰
  • "tests" β€” returns the tests for a given generation. Depending on context called, this is a hashref or a hash. The keys are the individual test names, and the value is a hashref stuffed with various interesting values. Each k/v pair might resemble something like this:
 't/foo.t' => {
    elapsed        => '0.0428488254547119',
    gen            => '7',
    last_pass_time => '1219328376.07815',
    last_result    => '0',
    last_run_time  => '1219328376.07815',
    last_todo      => '0',
    mtime          => '1191708862',
    seq            => '192',
    total_passes   => '6',
  }

look at all those little numbers. so much lore in one hashref πŸ“

  • "test"
my $test = $result->test('t/customer/create.t');

Returns an individual App::Prove::State::Result::Test instance for the given test name (usually the filename). And plot twist: if the name is not found, it will return a new App::Prove::State::Result::Test instance anyway. generous queen πŸ™ˆ

  • "test_names" β€” returns an list of test names, sorted by run order. (yes, "an list" β€” the original said it, we're keeping it, we don't gatekeep 😌)
  • "remove"
$result->remove($test_name);            # remove the test
my $test = $result->test($test_name);   # fatal error

Removes a given test from results. And if the test name isn't found? no-op, nothing happens, this is a no-op. chill. 😴

also look at that # fatal error comment β€” that's what happens if you try to grab the test after yeeting it. ask me how I know πŸ’€
  • "num_tests" β€” returns the number of tests for a given test suite result. counting is self care πŸ”₯
  • "raw" β€” returns a hashref of raw results, suitable for serialization by YAML. raw. unfiltered. no makeup. 🌸

and that's the whole page, bestie!! mwah πŸ’–

this was App::Prove::State::Result from perl v5.44.0, dated 2026-10-17 β€” so go forth, re-run those failed tests, and slay βœ¨πŸ‘‘πŸ’…

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms