Test2::...:EnvVar(3pm)
π Test2::Require::EnvVar(3pm) π
okay so hi bestie!! welcome to the Test2::Require::EnvVar(3pm) page from the Perl Programmers Reference Guide. this one is lowkey niche but highkey useful, iykyk π
β¨ NAME β¨
Test2::Require::EnvVar β only run a test when a specific environment variable is set. periodt.
πΈ DESCRIPTION πΈ
okay so the lore is: it's common practice to write tests that are only run when an environment variable is set. this module automates the (admittedly trivial) work of creating such a test. the way that it handles that tiny lil job is honestly a lil iconic, fr fr, no cap π«Ά
vibe check: if you want a test that only runs when a specific environment variable is set, this is the helper for you. not me being obsessed with how simple that is π
π SYNOPSIS π
use Test2::Require::EnvVar 'SOME_VAR';
...
done_testing;
ngl, that snippet ate and left no crumbs. you pass in 'SOME_VAR', and that's the demo. slay β¨
π₯ SOURCE π₯
the source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/. go be nosy, bestie β the repo is giving main character energy π
π 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/.
made with π for perl v5.42.3, dated 2026-11-03, and this iconic page is Test2::...:EnvVar(3pm) π
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms