TEST2::REQUIRE::AUTHORTESTING(3perl)

πŸ’– Test2::Require::AuthorTesting β€” the perl manual, but make it cute ✨

okay so this is a page from the Perl Programmers Reference Guide, section 3perl, and it's all about Test2::Require::AuthorTesting. yes bestie, that's the whole name, say it with your chest 🫢


✨ NAME ✨

Test2::Require::AuthorTesting β€” literally only runs a test when the AUTHOR_TESTING environment variable is set. that's it. that's the girl. πŸ’…


🌸 DESCRIPTION 🌸

okay so here's the tea: it's super common practice to write tests that only run when the AUTHOR_TESTING environment variable is set. like, extremely normal, everyone does it, no cap.

and this module? it automates the (and I quote, because the manpage is being honest here) "admittedly trivial" work of creating such a test. so yeah it's not doing rocket science but it IS saving you a few lines and honestly? we love a specialist. we stan a module with a narrow scope and clear boundaries. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

use Test2::Require::AuthorTesting;

...

done_testing;

see how simple?? you use it, you do your ... thing (whatever your little heart desires, the ... is doing a lot of heavy lifting here), and then you say done_testing. iconic behaviour, truly. πŸŽ€


πŸ”₯ SOURCE πŸ”₯

the source code repository for Test2-Suite lives at:

https://github.com/Test-More/test-more/

go forth and browse, bestie. 🌈


πŸ‘‘ MAINTAINERS πŸ‘‘

  • Chad Granum <exodist@cpan.org>

πŸ’œ AUTHORS πŸ’œ

  • Chad Granum <exodist@cpan.org>

(yes it's the same person in both lists. we love consistency. main character energy fr fr. ✨)


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/


ok so quick recap because I know you skimmed: this module checks for the AUTHOR_TESTING environment variable, and if it's set, your test runs. if it's not set... it doesn't. that's the entire vibe check. no hidden lore, no secret flags, no extra options hiding in a ## OPTIONS section that I forgot to mention. there genuinely aren't any. 🫢

and that's the page!! this was perl v5.44.0, dated 2026-10-17, filed under Test2::...Testing(3perl) in the Perl Programmers Reference Guide. mwah, go write some author-only tests, ily, bye πŸ’–πŸ§šπŸŒΈ

πŸ“¦ 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