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 fromApp::Prove::State::Result::Testor provide an identical interface. Either/or, bestie, dealer's choice π«Ά"generation"β getter/setter for the"generation"of the test suite run. The first generation is1(one) and subsequent generations are2,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