Test::...ersion(3pm)
πΈ Test::MinimumVersion β the manual, but make it cute β¨
okay so bestie, this is the page for Test::MinimumVersion from the User Contributed Perl Documentation, and it's literally the tool that tells you "hey girl, your code needs a newer perl than you thought π ". Let's get into it, no cap.
π NAME
Test::MinimumVersion β does your code require newer perl than you think?
like. it just. checks. π¦
β VERSION
version 0.101083
yes that's the whole thing. iconic number fr.
π SYNOPSIS
here's a lil example minimum-perl.t, gaze upon it:
#!perl
use Test::MinimumVersion;
all_minimum_version_ok('5.008');
that's it. that's the whole vibe. you write that file and it goes to work π«Ά
π PERL VERSION
okay so this one's important and it's giving "ancient perl rights":
This library should run on perls released even an extremely long time ago. It should work on any version of perl released in the last ten years. β³
Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. The version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. π
so likeβ¦ it'll probably run on your grandma's perl but don't come for them if they bump it, ok? π«Ά
β¨ FUNCTIONS β¨
π minimum_version_ok
minimum_version_ok($file, $version);
This test passes if the given file does not seem to require any version of perl newer than $version, which may be given as a version string or a version object. slay π
π all_minimum_version_ok
all_minimum_version_ok($version, \%arg);
Given either a version string or a version object, this routine produces a test plan (if there is no plan) and tests each relevant file with "minimum_version_ok". bestie is doing the most, respectfully π
Relevant files are found by File::Find::Rule::Perl. β¨
"\%arg" is optional. Valid arguments are:
pathsβ in what paths to look for files; defaults to (bin,script,t,lib,xt/smoke, and any.pmor.PLfiles in the current working directory) if it contains files, they will be checked πno_planβ do not plan the tests about to be runskipβ files to skip; this can be useful in weird cases like gigantic files, files falsely detected as Perl, or code that uses a source filter; this should be an arrayref of filenames π
π all_minimum_version_from_metayml_ok
all_minimum_version_from_metayml_ok(\%arg);
This routine checks META.yml for an entry in requires for perl. If no META.yml file or no perl version is found, all tests are skipped. If a version is found, the test proceeds as if "all_minimum_version_ok" had been called with that version. π¦
π all_minimum_version_from_metajson_ok
all_minimum_version_from_metajson_ok(\%arg);
This routine checks META.json for an entry in requires for perl. If no META.json file or no perl version is found, all tests are skipped. If a version is found, the test proceeds as if "all_minimum_version_ok" had been called with that version. πΈ
π all_minimum_version_from_mymetayml_ok
all_minimum_version_from_mymetayml_ok(\%arg);
This routine checks MYMETA.yml for an entry in requires for perl. If no MYMETA.yml file or no perl version is found, all tests are skipped. If a version is found, the test proceeds as if "all_minimum_version_ok" had been called with that version. π
π all_minimum_version_from_mymetajson_ok
all_minimum_version_from_mymetajson_ok(\%arg);
This routine checks MYMETA.json for an entry in requires for perl. If no MYMETA.json file or no perl version is found, all tests are skipped. If a version is found, the test proceeds as if "all_minimum_version_ok" had been called with that version. π
π AUTHOR
Ricardo Signes
π CONTRIBUTORS
- Ricardo SIGNES
<rjbs@codesimply.com> - Ricardo Signes
<rjbs@semiotic.systems> - Steve Hay
<steve.m.hay@googlemail.com>
π COPYRIGHT AND LICENSE
This software is copyright (c) 2007 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π«Άβ¨
and that's the whole page, bestie! this one came from perl v5.40.1, dated 2025-05-04, and it belongs to Test::MinimumVersion(3pm) π go forth and test your minimums, periodt. ππ¦
π¦ where this page comes from
- debian trixie: libtest-minimumversion-perl 0.101083-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtest-minimumversion-perl 0.101083-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtest-minimumversion-perl 0.101083-2 Β· Artistic-1.0-Perl OR 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