Test2:...::Perl(3perl)
β¨ Test2::Require::Perl β bestie edition β¨
okay so the manual page here is Test2:...::Perl(3perl) from the Perl Programmers Reference Guide, and ngl it's a short one but it's so useful. sit down, we're doing this π«Ά
πΈ NAME πΈ
Test2::Require::Perl β skip the test unless the necessary version of Perl is installed.
it's giving "gatekeep the test until the vibes (and the perl) are right" π
π¦ DESCRIPTION π¦
so like, sometimes you have tests that are genuinely nice to run, right? they're cute, they're slay β but they depend on a certain version of Perl. and if that version isn't there? messy. π
this package lets you run the test conditionally, depending on whether the correct version of Perl is actually available. no cap. if the perl you asked for isn't installed, the test just skips instead of screaming at you. iconic behaviour honestly β¨
π SYNOPSIS π
# Skip the test unless perl 5.10 or greater is installed.
use Test2::Require::Perl 'v5.10';
# Enable 5.10 features.
use v5.10;
like β one little use line and boom, your test is version-gated. obsessed π
π§ SOURCE π§
the source code repository for Test2-Suite lives right here:
https://github.com/Test-More/test-more/
go look, it's free real estate β
π 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, that's it, that's the manual π
sign-off time: this was perl v5.44.0, dated 2026-10-17, and it's the manual for Test2:...::Perl(3perl). mwah, go run those tests πβ¨π¦
π¦ 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