Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

[Solved]: How to check compatibility of perl modules with Perl version

by Perl300 (Friar)
on Jul 06, 2015 at 21:08 UTC ( [id://1133445]=perlquestion: print w/replies, xml ) Need Help??

Perl300 has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,

I tried to check for this on CPAN as well but couldn't find it. I hope I am not missing to search somewhere specific on CPAN.

It's that before installing any new module I wanted to know if it would be compatible with the version on perl I have which is 5.10

Thanks in advance!

  • Comment on [Solved]: How to check compatibility of perl modules with Perl version

Replies are listed 'Best First'.
Re: How to check compatibility of perl modules with Perl version
by jeffa (Bishop) on Jul 06, 2015 at 21:22 UTC

    If you use cpanm you can just run the tests like so:

    cpanm --test-only

    I also recommend using Perlbrew which will allow you to install and manage different versions of Perl, so you could still develop on a newer Perl and smoke test on 5.10.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: How to check compatibility of perl modules with Perl version
by Anonymous Monk on Jul 06, 2015 at 22:26 UTC
      Thanks you Jeffa and Anonymous monk. Specially the CPAN Testers Matrix link went right into my bookmarks :-)
Re: [Solved]: How to check compatibility of perl modules with Perl version
by thanos1983 (Parson) on Jul 06, 2015 at 23:07 UTC
Re: [Solved]: How to check compatibility of perl modules with Perl version
by Khen1950fx (Canon) on Jul 07, 2015 at 11:56 UTC
    CPAN won't install a module if it's not compatible with your perl version. If the module requires 5.10.1, it'll tell you and stop. What's more important to me is the minimum version of perl. For example, Perl::MinimumVersion requires a minimum of 5.006, so you can check it like this:
    #!/usr/bin/perl -l use strict; use warnings; use Perl::MinimumVersion; my $obj = Perl::MinimumVersion->new( "/usr/local/share/perl5/Perl/MinimumVersion.pm", ); print $obj->minimum_version;
    Unfortunately, it only works with files on your disk: files, scripts, code, modules, etc.
      Thank you thanos1983 and Khen1950fx. The minimum version is really important to know. Thanks for mentioning it here.
        That module comes with a frontend, perlver - The Perl Minimum Version Analyzer

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1133445]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-23 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found