Test2::Env(3perl)
π Test2::Env β the env vars episode π
okay bestie, so this is the manual page for Test2::Env, part of the 3perl manual set in the Perl Programmers Reference Guide. It's literally just the receipts on which environment variables Test2 reads and which ones it sets. No cap.
β¨ NAME β¨
Test2::Env β the documentation for all the environment variables that Test2 either uses or sets. that's it, that's the whole job π
πΈ DESCRIPTION πΈ
okay so picture this: a whole list. every environment variable that is either set by Test2, or read by Test2. that's the vibe. let's go one by one π¦
β AUTHOR_TESTING β
read by Test2. when you set this one, Test2 goes ahead and runs the tests that normally get skipped β the ones that only run when a module author is doing their special extra author-only testing. it's giving "backstage pass" energy π
β AUTOMATED_TESTING β
read by Test2. set this and you're basically announcing "a robot is running these tests, no human is here to click anything." no human interaction is possible, periodt.
see also Test2::Require::AuthorTesting if you wanna go deeper.
β EXTENDED_TESTING β
read by Test2. setting this says "yeah we're doing some extended testing today" β the kind that would normally be skipped. so it will not be skipped. it will be run. π₯
see also Test2::Require::ExtendedTesting.
β HARNESS_ACTIVE β
read by Test2. this one is usually set for you by prove (that's Test::Harness) or by yath (that's App::Yath). you don't have to do anything, they've got it π
β NONINTERACTIVE_TESTING β
read by Test2. when set, it means the testing is not going to be interactive. like, nobody's typing anything back. silence, but make it test suite π
see also Test2::Require::NonInteractiveTesting.
β RELEASE_TESTING β
read by Test2. when set, it means release testing is happening, which lowkey might run more tests than normal. so many tests. iconic.
see also Test2::Require::ReleaseTesting.
β T2_FORMATTER β
this is the one where you get to pick the formatter Test2 will use. here's the tea on how the name gets resolved:
- if you set it to a string with no
+prefix, thenTest2::Formatter::gets glued onto the front of the module name. - if a
+is there, it gets stripped off and the module name is left completely alone. no extra modification, no notes, we leave it as-is π«Ά
β T2_IN_PRELOAD β
Test2 itself sets this one when preload mode is active. its main character era is inside App::Yath and similar tools that preload Test2 and then fork to run tests. fork and go, babe π
β TABLE_TERM_SIZE β
this sets a terminal width for stuff like diagnostic message tables. so your tables can be the right size. we love a formatted table π
β TEST2_ACTIVE β
Test2 sets this variable when tests are running. that's it. it's a little flag that says "we're doing it" β¨
β TEST2_ENABLE_PLUGINS β
okay this one is fun. you can use it to force plugins to load when the Test2 API is loaded. it takes a list of one or more plugin names, separated by commas.
the namespace rules are the same energy as T2_FORMATTER:
- if the module name does not have a
+in front of it, then theTest2::Plugin::namespace is assumed and gets added. - if a
+is present at the start of a module name, it gets stripped and no further modification is made. like, we're not touching it π
examples, verbatim:
TEST2_ENABLE_PLUGINS=BailOnFail
Test2_ENABLE_PLUGINS=SRand,+My::Plugin::Name
(yes, the second one is written exactly like that in the original. keep it exactly like that. π)
β TEST_ACTIVE β
set by Test2 when tests are running. sibling energy with TEST2_ACTIVE, but with a different name. gotta catch 'em all π
β TS_MAX_DELTA β
used to figure out how many max lines of output you'll get when is() finds a deep data structure mismatch. so when your deep structure betrays you, this controls how much of the crime scene you get to see π
π SOURCE π
the source code repository for Test2-Suite lives at:
https://github.com/Test-More/test-more/
go forth and star it, bestie β
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
π AUTHORS π
Chad Granum <exodist@cpan.org>
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
see http://dev.perl.org/licenses/
π and that's the whole page, bestie! this wasTest2::Env(3perl)β from the Perl Programmers Reference Guide, versionperl v5.44.0, dated2026-10-17. iykyk ππ¦β¨
π¦ 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