Test::S(3)

πŸ“¦ version 0.003, in alpine 3.24

πŸŽ€ Test::S(3) πŸŽ€

okay so real quick β€” this is Test::S, and we're living in the User Contributed Perl Documentation section of the manual, bestie. buckle up, it's a tiny one but it's iconic πŸ’…

✨ NAME ✨

Test::S β€” literally just "change test settings on the command line." that's the whole vibe πŸ¦‹

🌸 VERSION 🌸

version 0.003 β€” yes she's baby, yes she's serving 🍼

🧚 SYNOPSIS 🧚

run author test:

perl -MTest::S=author test.t

or with prove:

prove -MTest::S=author -r .

change a few settings:

prove -MTest::S=author,smoke

or disable certain kinds explicitly:

prove -MTest::S=no_smoke

don't run interactive tests:

prove -MTest::S=non_interactive -r .

like?? so clean. so effortless. main character syntax fr fr πŸ’–

πŸ’« DESCRIPTION πŸ’«

Test::S is a shortened interface to the functionality provided by Test::Settings β€” for use on the command line, to modify the environment on the fly. that's it, that's the whole job ✨

⚠️ rude warning incoming: this should not be used in modules! It will not behave! like, it will absolutely feral out on you. don't do it. i'm begging πŸ™ˆ

this lets you enable or disable certain types of tests on the command line without needing to set environment variables by hand. no more exporting env vars like a caveman, we're modern here πŸ˜­πŸ‘‘

🌈 Allowed modifiers

to use the modifiers on the command line, with many tools you can load the module with -M and provide a comma separated list of the modifiers you want:

perl -MTest::S=all,no_smoke

the following can all be used in combination with each other (though some combinations obviously cancel each other out β€” yes, chaos is permitted πŸŒ€):

  • smoke
  • non_interactive
  • extended
  • author
  • release
  • all
  • no_smoke
  • no_non_interactive
  • no_extended
  • no_author
  • no_release
  • none

twelve of them. all valid. all yours. no cap πŸ”₯

πŸ“ Notes

non_interactive means do not run interactive tests, and no_non_interactive means run interactive tests. this can be slightly confusing. slightly?? SLIGHTLY?? it's giving double-negative gymnastics and i respect it πŸ’€

all and none, if used, should be the first items in the list β€” else they will override the other settings. so put them up front or they'll steamroll everything behind them like the main characters they are πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

  • Test::Settings β€” Ask or tell when certain types of tests should be run
  • Test::DescribeMe β€” Tell test runners what kind of test you are
  • Test::Is β€” Skip test in a declarative way, following the Lancaster Consensus

go read them. they're the friend group. this module is the one that makes the intros πŸ’œ

πŸ‘‘ AUTHOR πŸ‘‘

Matthew Horsfall (alh) β€” <wolfsage@gmail.com> β€” we stan 🫢

⭐ LICENSE ⭐

You may distribute this code under the same terms as Perl itself. slay, legally speaking πŸ’…


and that's the whole thing! this page was served up by perl v5.42.2 on 2026-02-15 β€” mwah, go run your tests bestie πŸ˜˜πŸŽ€

πŸ“¦ where this page comes from