APP::PROVE::STATE(3perl)
β¨ NAME β¨
App::Prove::State β bestie, it's the state storage for the prove command πΎπ
πΈ VERSION πΈ
Version 3.52 β
π¦ DESCRIPTION π¦
Okay so picture this: the prove command has a --state option, and what that does is tell it to keep persistent state across runs β like, it remembers stuff between invocations, main character energy fr fr. This module is the thing that implements that state, plus all the operations you can do on it. Periodt. π
π SYNOPSIS π
# Re-run failed tests
$ prove --state=failed,save -rbv
look at her go π₯°
π METHODS π
π Class Methods π
newβ the constructor, obviously. 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. no cap, identical interface, she's not picky but she IS specific π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. do NOT forget this one bestie, it's giving "unsaved homework" π
π 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: %s(yeah she WILL call you out π)
So here's the menu of switch options you can feed her:
lastβ 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 test 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. πloadβ load the state from a file. π₯
and that's the whole vibe, iykyk π
k byeeee, this was App::P...::State(3perl) from perl v5.44.0, dated 2026-10-17 β slay, stream it, cite it, love her πβ¨π
π¦ 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