App::Prove::State(3pm)
πΈ NAME πΈ
Okay bestie, welcome to the App::Prove::State(3pm) page β it's from the Perl Programmers Reference Guide, and it's literally the state-storage module for the prove command. π
β¨ VERSION β¨
Version 3.50 β periodt. π
π DESCRIPTION π
So prove supports a --state option that tells it to store persistent state across runs. This module implements that state plus the operations you can perform on it. No cap. β¨
π SYNOPSIS π
# Re-run failed tests
$ prove --state=failed,save -rbv
π METHODS π
π§ Class Methods
newβ accepts a hashref with these key/value pairs:storeβ the filename of the data store holding the data thatApp::Prove::Statereads. ποΈextensions(optional) β the test name extensions. Defaults to.t.result_class(optional) β the name of theresult_class. Defaults toApp::Prove::State::Result.
result_classβ getter/setter for the name of the class used for tracking test results. This class should either subclass fromApp::Prove::State::Resultor provide an identical interface. Slay. πextensionsβ get or set the list of extensions that files must have in order to be considered tests. Defaults to['.t'].resultsβ get the results of the last test run. Returns aresult_class()instance. πcommitβ save the test results. Should be called after all tests have run. β¨
π¦ Instance Methods
apply_switchβ apply a list of switch options to the state, updating the internal object state as a result. Nothing is returned.
$self->apply_switch('failed,save');
Diagnostics:
Illegal state option: %slastβ run in the same order as last time.failedβ run only the failed tests from last time.passedβ run only the passed tests from last time.allβ run all tests in normal order.hotβ run the tests that most recently failed first.todoβ run the tests ordered by number of todos.slowβ run the tests in slowest to fastest order.fastβ run tests in fastest to slowest order.newβ run the tests in newest to oldest order.oldβ run the tests in oldest to newest order.saveβ save the state on exit. πΎget_testsβ given a list of args, get the names of tests that should run.observe_testβ store the results of a test.saveβ write the state to a file. (Yes, there's anothersavebestie β this one writes the state. π«Ά)loadβ load the state from a file.
That's the whole vibe check, bestie. This page came with Perl v5.42.3, dated 2026-11-03, and it's App::Prove::State(3pm) β bye and slay! πβ¨
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms