Test::Settings(3)
π NAME π
okay so you're on the Test::Settings(3) page from the User Contributed Perl Documentation, and the whole vibe is: Test::Settings β Ask or tell when certain types of tests should be run. Like, it's the friend who tells your test suite whether it's smoke-test time, extended-test time, author-test time, etc. π
πΈ VERSION πΈ
version 0.003 β tiny version number, big main character energy β¨
β¨ SYNOPSIS β¨
Check the current settings
use Test::Settings qw(:all);
if (want_smoke) {
printf("I must be a smoke tester\n");
}
if (want_non_interactive) { ... }
if (want_extended) { ... }
if (want_author) { ... }
if (want_release) { ... }
if (want_all) { ... }
Change settings
enable_smoke;
enable_non_interactive;
enable_extended;
enable_author;
enable_release;
enable_all;
disable_smoke;
disable_non_interactive;
disable_extended;
disable_author;
disable_release;
disable_all;
Helper - see the settings as a string
print current_settings;
Print enabled settings as ENV vars
print current_settings_env;
Print all settings as ENV vars
print current_settings_env_all;
π¦ DESCRIPTION π¦
There are a bunch of environment variables used to control how tests should behave, and sometimes those names or meanings change. Messy, right? π
This library tries to give you a consistent interface so testers and toolchain users can figure out the state of testing without having to care about the intricacies behind the scenes. It's giving "emotional support API" π«Ά
π Inspecting the state of things π
Currently, the following methods are provided to see what the current state of the testing options are. Unless a user or tool explicitly requests otherwise, these will usually all return false.
want_smoke
if (want_smoke) { ... }
Returns true if we are currently being run by a smoker or a 'robot'. π€
want_non_interactive
if (want_non_interactive) { ... }
Returns true if we are in non-interactive mode. That means tests should not prompt the user for information. No pop quizzes, bestie. π
want_extended
if (want_extended) { ... }
Returns true if extended testing has been requested. Often modules ship with extra (non author/release) tests that users may opt in to run.
want_author
if (want_author) { ... }
Returns true if author testing has been requested. Author tests are used during development time only.
want_release
if (want_release) { ... }
Returns true if release testing has been requested. Release tests are used when a new release of a distribution is going to be built to check sanity before pushing to CPAN. Sanity check before CPAN? Obsessed. β
want_all
if (want_all) { ... }
Returns true if all of the above wants are true.
π οΈ Changing the state of things π οΈ
The methods below let you modify the state of testing. Smokers and build tools can use this to inform testing tools how to run. It's literally the group chat setting the plan. π¬
enable_smoke / disable_smoke
enable_smoke();
disable_smoke();
This enables or disables (default) smoke testing.
enable_non_interactive / disable_non_interactive
enable_non_interactive();
disable_non_interactive();
This enables or disables (default) non-interactive testing.
enable_extended / disable_extended
enable_extended();
disable_extended();
This enables or disables (default) extended testing.
enable_author / disable_author
enable_author();
disable_author();
This enables or disables (default) author testing.
enable_release / disable_release
enable_release();
disable_release();
This enables or disables (default) release testing.
enable_all / disable_all
Enable or disable all of the test switches at once. One button, all the vibes. π
π Extra information π
If you'd like a quick representation of the current state of things, the methods below will help you inspect them.
current_settings
my $str = current_settings();
print $str;
Displays a table of the current settings of all wants.
current_settings_env
my $str = current_settings_env();
print $str;
Prints enabled settings only as ENV vars.
current_settings_env_all
my $str = current_settings_env_all();
print $str
Prints ALL settings asa ENV vars. π
π SEE ALSO π
Test::S- Change test settings on the command lineTest::DescribeMe- Tell test runners what kind of test you areTest::Is- Skip test in a declarative way, following the Lancaster Consensus<https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md>- The Annotated Lancaster Consensus
π AUTHOR π
Matthew Horsfall (alh) - <wolfsage@gmail.com> β iconic author moment π
π LICENSE π
You may distribute this code under the same terms as Perl itself.
And that's the whole page, bestie. Signed off by perl v5.42.2, dated 2026-02-15, and yes β this is the Test::Settings(3) page. Periodt. π
β¨
π¦ where this page comes from
- alpine 3.24: perl-test-settings-doc 0.003-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms