Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
P is for Practical
 
PerlMonks  

CPAN Modules

by WorkerBee (Novice)
on Jul 11, 2013 at 01:56 UTC ( #1043612=perlquestion: print w/ replies, xml ) Need Help??
WorkerBee has asked for the wisdom of the Perl Monks concerning the following question:

Hello Everyone; I am somewhat new to Perl so, your patience and assistance is much appreciated! I have an environment where CPAN is not an option due to firewall constraints. I need to locate and install modules that will work on Perl 5.8. I am having difficulty determining module versions and compatability from the CPAN site. Specifically, I need Array::Utils and JSON. So, if you could kindly direct me to where I can download these (tar.gz) format and how to find the versions that will be compatible with Perl 5.8. Thank you in advance.

Comment on CPAN Modules
Re: CPAN Modules
by rjt (Chaplain) on Jul 11, 2013 at 03:37 UTC

    cpan will happily suggest HTTP mirrors during the initial config, unless your firewall has blocked regular web access (or blocked every CPAN mirror, and updates that block list). Tell us what the specific problem is, and maybe we can help.

    As for old versions of modules, see the CPAN FAQ: Where can I find older/obsolete versions of Perl or Perl Modules? http://backpan.perl.org/

    There is http://www.cpantesters.org which has a large matrix of test results that would probably help you, but it seems to be offline right now.

    The modules you mention both have comprehensive unit tests, so it may be simplest to try to install the latest versions, and if they fail (and don't have an obvious simple fix), then go to the above FAQ link.

    And, of course, Yes, even you can use CPAN!

    Finally, 5.8 is really old already (2002), and hasn't been supported since 2008. I'd strongly recommend planning an upgrade strategy as soon as you can, as it will only get harder from here.

    Hope this helps.

    Edit: Added note on 5.8 support.

Re: CPAN Modules
by davido (Archbishop) on Jul 11, 2013 at 05:15 UTC

    This is pretty easy to investigate:

    Array::Utils: First you visit http://metacpan.org and type in its search box, "Array::Utils". Click on the first item in the search results. On the right side of the page you'll see a link that says, "Dependencies" (unknown, in this case). Since dependencies seem to be "unknown", you would then want to click (at the left of the page) "Source", and view the module's source to see what dependencies it has. It appears to have no non-core dependencies.

    Great, so next let's check the module's test results: Click on the "Test Results" link, and you'll find that it has, indeed passed tests on Perl 5.8. While you're at it, follow the module's page's "Browse" link, and then quickly review Makefile.PL, and the test suite to see if it has any hidden dependencies or explicit minimum Perl versions. It doesn't. You are good to go. Let's download it.

    Again on the module's main page at metacpan, you will find a "Download" link. Click it, and Array-Utils-0.5.tar.gz will be downloaded to your system. You can unpack that tarball into a build directory, then perform the mantra: perl Makefile.PL, then make, make test, and if all goes well, make install.

    Now for JSON: Take the same steps as above. You'll find it has no non-core dependencies listed, and that as you browse through the distribution's files, the test suite is designed to handle Perl versions that are pre-5.8. Reviewing test results will also show plenty of PASS tests for Perl 5.8.

    Again, you can click the "Download" link, and get the tarball, unpack it, and perform the mantra.

    This is the same investigative process you can follow for just about any module. Some will turn out to not be as easy to get up and running, but the investigation is the same; check dependencies, check tests, download (possibly download dependencies), build it, enjoy.


    Dave

Re: CPAN Modules
by walkingthecow (Friar) on Jul 26, 2013 at 04:35 UTC
    When you are configuring CPAN you have the option of setting your proxy, so long as you do not have it automatically configure everything. As well, if you are in a UNIX environment then I'd highly suggest setting your proxy related environment variables (http_proxy, https_proxy, ftp_proxy) as well. I've yet to encounter a proxy that completely blocked from getting CPAN modules.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1043612]
Front-paged by rjt
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-04-17 22:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (458 votes), past polls