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 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. 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 a result_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: %s
  • 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 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 another save bestie β€” 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