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 that App::Prove::State reads. πŸ“‚
    • extensions (optional) β€” the test name extensions. Defaults to .t. πŸ“
    • result_class (optional) β€” the name of the result_class. Defaults to App::Prove::State::Result. ✨
  • result_class β€” getter/setter for the name of the class used for tracking test results. This class should either subclass from App::Prove::State::Result or 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 a result_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