Test::MinimumVersion - does your code require newer perl than you think?
version 0.101083
Example minimum-perl.t:
#!perl use Test::MinimumVersion; all_minimum_version_ok('5.008');
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.
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.
$version
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.
minimum_version_ok
Relevant files are found by File::Find::Rule::Perl.
\%arg is optional. Valid arguments are:
\%arg
paths - in what paths to look for files; defaults to (bin, script, t, lib, xt/smoke, and any .pm or .PL files in the current working directory) if it contains files, they will be checked no_plan - do not plan the tests about to be run skip - 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(\%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_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(\%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(\%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.
Ricardo Signes
Ricardo SIGNES <rjbs@codesimply.com>
Ricardo Signes <rjbs@semiotic.systems>
Steve Hay <steve.m.hay@googlemail.com>
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.
To install Test::MinimumVersion, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::MinimumVersion
CPAN shell
perl -MCPAN -e shell install Test::MinimumVersion
For more information on module installation, please visit the detailed CPAN module installation guide.