How would I know if a particular module is recommended for use with my older Perl version? Does CPANM or CPAN have argument to check that everything that will be brought in is valid for the version of Perl in use? I have old version of Perl and am hesitant bringing in additional libraries.
2 Answers
Check the CPAN Testers Matrix for the distribution(s) you are interested in. If the module will build and pass its tests on a particular version of perl and a particular OS, this page will tell you.
If the distribution specified a minimum required version of Perl, it will be found in ->{prereqs}{runtime}{requires}{perl}
in the META.json
or META.yml
file found in the distribution. For example, GFUJI/Mouse-v2.4.10
states a dependency on Perl 5.8.5.
Beyond that, you can view the results of volunteers that donate hardware and time to test every version of every module on CPAN. They are found in the CPAN Testers Matrix. Both search.cpan.org and metacpan.org link to the test result matrix of each distribution.
cpan
and cpanm
will heed the minimum version found in the META.json
or META.yml
; they won't even try to install a module that's requires a newer perl
. cpan
and cpanm
will also run the test suite the distribution provides. Only if the test suite passes without error will they install the distribution.