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

From time to time I drop in on the perl.cpan.testers newsgroup at nntp.perl.org and notice that someone has uploaded a newer version of a module that I already have installed. I'd like to get that new version, test it and, perhaps, file a testing report of my own.

However, I find that trying to get the new version from the cpan shell doesn't always DWIM. For example, today I noticed that Fergal Daly uploaded new versions of four of his modules, each of which I have installed. See example: http://www.nntp.perl.org/group/perl.cpan.testers/257410 for Test-Tester-0.103. Version 0.103 has made it to http://www.cpan.org/modules/by-authors/id/F/FD/FDALY/ as well as to http://search.cpan.org/~fdaly/Test-Tester-0.103/ -- but it hasn't (as of 10 minutes ago) made it to ftp://ftp.cpan.org or any of the mirrors.

My ~/.cpan/CPAN/MyConfig.pm is set up with 5 ftp sites in the urllist key, so when I run the shell it fails to find 0.103 at any of those sites and defaults to my already-installed version of Test::Tester.

Now, I could simply wait for the ftp sites to catch up with www.cpan.org -- but what if I'm impatient? (A virtue, remember.) How can I get the version of the module that's hot off the author's keyboard?

TIA

Jim Keenan

Replies are listed 'Best First'.
Re: Getting Modules Hot Off the Keyboard
by Corion (Patriarch) on Oct 08, 2005 at 18:34 UTC

    You will need to set ftp.cpan.org as your primary mirror and force CPAN.pm to update its index from there "right now". You could also just wait until the latest release has propagated, as many releases are quickly followed by one or two "fixup" releases that fix typos, packaging errors or other administrivia.

    I run a local CPAN mirror that updates every 6 hours, so I'm just 6 hours behind the latest of the greatest. I find that enough :-)

      Talk about a rapid response! Thanks!

      But, IIUYC, I can't get anything until the distribution has made it to ftp://ftp.cpan.org -- at least not through the cpan shell. For normal installation purposes, that's fine. But I was wondering if there was something I could use (other than manual downloading) for a quick look-see-and-test.

      Jim Keenan

      UPDATE one day later: I've decided to try hacking something which uses LWP::Simple::getstore() to retrieve the file from http://www.cpan.org, tests it, and sends a report with Test::Reporter. I'll post it when I get it somewhat functional. Thanks for all who have read this far.

      UPDATE 2: Here is the aforepromised hack. It DWIMs with one key exception: The mail sent isn't showing up immediately on perl.cpan.testers (either web interface or newsgroup). This is the first time I've attempted to send mail from within a Perl program, so maybe there's something I don't understand. OTOH, when I've sent ordinary mail to that list, it has sometimes taken 12 hours to get posted.

      In any event, have at it gang!

      Jim Keenan

        I think you can also set http://www.cpan.org/ (or maybe http://www.cpan.org/CPAN/ or something) as a mirror in your mirror list. CPAN.pm uses LWP to retrieve the files. I use a local mirror mounted via samba and have file://server/cpan/minicpan as my top mirror in the CPAN list.

        How hot do you want it? If they have a subversion or CVS repo, maybe you want to check that out so you can just update and set $PERL5LIB for a while to play with the new toys. I've been doing something crazy with symlinks for over a year now. It doesn't get much hotter!