Test2::...:Module(3pm)
πΈ NAME πΈ
okay so this is the Test2::...:Module(3pm) page from the Perl Programmers Reference Guide, and the main character is Test2::Require::Module π β the module that skips tests if certain packages are not installed, or if their versions are insufficient. slay.
π DESCRIPTION π
Sometimes you have tests that are nice to run, but they depend on tools that may not be available π. Instead of adding the tool as a dep, or making the test always skip, itβs common to make the test run conditionally. This package helps make that possible. iconic.
This module is modeled after Test::Requires. The difference is that this module is based on Test2 directly, and does not go through Test::Builder. Another difference is that the packages you check for are not imported into your namespace for you. This is intentional. no cap β that last bit is on purpose, bestie π
.
β¨ SYNOPSIS β¨
Hereβs the exact code vibe check π keep it verbatim:
# The test will be skipped unless Some::Module is installed, any version.
use Test2::Require::Module 'Some::Module';
# The test will be skipped unless 'Other::Module' is installed and at
# version '5.555' or greater.
use Test2::Require::Module 'Other::Module' => '5.555';
# We now need to use them directly, Test2::Require::Module does not import
# them for us.
use Some::Module;
use Other::Module;
Thatβs it β Test2::Require::Module does not import the checked packages for you, so you use them directly after. π«Ά
π SOURCE π
The source code repository for Test2-Suite can be found at https://github.com/Test-More/test-more/. <orange>go off, bestie</orange> π₯.
π MAINTAINERS π
- Maintainer:
Chad Granum <exodist@cpan.org>
π¦ AUTHORS π¦
- Author:
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/
mwah π thatβs the whole page, bestie β served from perl v5.42.3, dated 2026-11-03, and filed under the Test2::...:Module(3pm) manual page. bye π«Ά
π¦ 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