1Test::MinimumVersion(3)User Contributed Perl DocumentatioTnest::MinimumVersion(3)
2
3
4
6 Test::MinimumVersion - does your code require newer perl than you
7 think?
8
10 version 0.101083
11
13 Example minimum-perl.t:
14
15 #!perl
16 use Test::MinimumVersion;
17 all_minimum_version_ok('5.008');
18
20 This library should run on perls released even an extremely long time
21 ago. It should work on any version of perl released in the last ten
22 years.
23
24 Although it may work on older versions of perl, no guarantee is made
25 that the minimum required version will not be increased. The version
26 may be increased for any reason, and there is no promise that patches
27 will be accepted to lower the minimum required perl.
28
30 minimum_version_ok
31 minimum_version_ok($file, $version);
32
33 This test passes if the given file does not seem to require any version
34 of perl newer than $version, which may be given as a version string or
35 a version object.
36
37 all_minimum_version_ok
38 all_minimum_version_ok($version, \%arg);
39
40 Given either a version string or a version object, this routine
41 produces a test plan (if there is no plan) and tests each relevant file
42 with "minimum_version_ok".
43
44 Relevant files are found by File::Find::Rule::Perl.
45
46 "\%arg" is optional. Valid arguments are:
47
48 paths - in what paths to look for files; defaults to (bin, script, t, lib,
49 xt/smoke, and any .pm or .PL files in the current working
50 directory) if it contains files, they will be checked
51 no_plan - do not plan the tests about to be run
52 skip - files to skip; this can be useful in weird cases like gigantic
53 files, files falsely detected as Perl, or code that uses
54 a source filter; this should be an arrayref of filenames
55
56 all_minimum_version_from_metayml_ok
57 all_minimum_version_from_metayml_ok(\%arg);
58
59 This routine checks META.yml for an entry in requires for perl. If no
60 META.yml file or no perl version is found, all tests are skipped. If a
61 version is found, the test proceeds as if "all_minimum_version_ok" had
62 been called with that version.
63
64 all_minimum_version_from_metajson_ok
65 all_minimum_version_from_metajson_ok(\%arg);
66
67 This routine checks META.json for an entry in requires for perl. If no
68 META.json file or no perl version is found, all tests are skipped. If
69 a version is found, the test proceeds as if "all_minimum_version_ok"
70 had been called with that version.
71
72 all_minimum_version_from_mymetayml_ok
73 all_minimum_version_from_mymetayml_ok(\%arg);
74
75 This routine checks MYMETA.yml for an entry in requires for perl. If
76 no MYMETA.yml file or no perl version is found, all tests are skipped.
77 If a version is found, the test proceeds as if "all_minimum_version_ok"
78 had been called with that version.
79
80 all_minimum_version_from_mymetajson_ok
81 all_minimum_version_from_mymetajson_ok(\%arg);
82
83 This routine checks MYMETA.json for an entry in requires for perl. If
84 no MYMETA.json file or no perl version is found, all tests are skipped.
85 If a version is found, the test proceeds as if "all_minimum_version_ok"
86 had been called with that version.
87
89 Ricardo Signes
90
92 • Ricardo SIGNES <rjbs@codesimply.com>
93
94 • Ricardo Signes <rjbs@semiotic.systems>
95
96 • Steve Hay <steve.m.hay@googlemail.com>
97
99 This software is copyright (c) 2007 by Ricardo Signes.
100
101 This is free software; you can redistribute it and/or modify it under
102 the same terms as the Perl 5 programming language system itself.
103
104
105
106perl v5.38.0 2023-07-21 Test::MinimumVersion(3)