Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

bart (450)

Journal of bart (450)

Tuesday December 05, 2006
05:09 PM

A pleasant surprise in CPAN.pm

[ #31816 ]
Yesterday, I was trying out a perl of shady origin on my work PC, and while I was dabbling in the CPAN shell, suddenly, to my suprise, when I tried installing a module, it me showed the following message:

The required 'nmake' executable not found, fetching it...
Fetching 'Nmake15.exe' from download.microsoft.com... done!

I was baffled. I never had expected that. This is so cool!

It made me start dreaming again of a completely autonomously selfconfiguring installation system. Searching for a proper list of CPAN mirrors, without any help from the user, for example.

I know there have been a few attempts on creating an automated tool, but I don't think any ever came out of the beta stage.

There are basically two ways to achieve this goal:

  1. Figuring out where in the world you are. But that requires either use of a not-really-free database, like the one from Geo::IP, or the cooperation of a website that can tell your system where you are. I thought perl.com used to do this a long time ago, on the URL http://www.perl.com/CPAN-local, which still does something, though I have no idea what. It'd be nice if perl.org or cpan.org would do that.
  2. Alternatively, try using ping, tracert/traceroute and related tools, to find a few nearby and responsive CPAN mirrors.

Neither of these look like the complete solution to me.

I do think that it would be helpful if the list of mirrors that CPAN.pm retrieves from CPAN, was to contain a rating for the mirrors, based on responsiveness, speed, available bandwidth, and last but not least: up-to-date-ness.

Update: Half of my time on CPAN, I'm on search.cpan.org. That always made me wonder: does search.cpan.org make use worldwide mirroring, too?

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • ..than I do in the U.S. There are multiple search.cpan.org sites, and the one you use depends on the the country that your IP address suggests you are in.
  • I'm happy that you like my little nmake-fetching trick -- the magic is in Module::Install, not in CPAN.pm. :-)
  • Half of my time on CPAN, I'm on search.cpan.org. That always made me wonder: does search.cpan.org make use worldwide mirroring, too?

    search.cpan uses Ask's geoDNS to route traffic to one of two sites, the main perl.org racks in the US or to our mirror in London. It would work with more if anyone wanted to host one in, say, Asia or Australia.

    • So there are two search.cpan.org [cpan.org] sites. Urm... for half of everything everybody does in CPAN in the world? While there are 280 CPAN mirrors?

      Something looks to be very much out of proportion.
      • Yep, there are probably far more CPAN mirrors than are actually required !

        Seriously, search.cpan.org is well down our list of busy sites so it doesn't really need many more mirrors. I understand an Asian/Pacific mirror would be welcomed but the existing servers seem to be coping just fine with the load.

        S.

  • Of course, one can only wonder why Perl has insisted on an external make program for pure Perl modules for the last 15 years, but nevermind that. Where's pmake?!
    • Of course, one can only wonder why Perl has insisted on an external make program for pure Perl modules for the last 15 years

      Bad interface design. Seriously.

      The canonical way to install a CPAN module is
      perl Makefile.pl
      make
      make test
      make install
      and the problem is all those invocations of make.

      In most cases, those make targets end up running perl one-liners anyway; there's been a lot of heroic effort to take out dependencies on other programs and design other build systems.

      (I'm not saying the bad interface design is anybody's fault. Lots of things sort of happen by convention and aren't really designed, or at least are