in reply to Re: howto install modules
in thread howto install modules

Thanks for example how to install Conway's version.

But I still see a problem: it's not obvious way to install just last version of Smart::Comments - to use CPAN.pm this way I first should hit this issue and found author and last version for needed modules manually... this mean CPAN.pm doesn't work in right way and don't do it's primary task (automatically install needed module from CPAN). This mean CPAN.pm and CPANPLUS.pm are not reliable tools. :-(

I just did some reasearch on this topic and found this:

This in turn mean CPAN.pm not only try to install incorrect version, but also it found incorrectly configured mirror to download file deleted from main CPAN site... this sounds like sabotage! :-)))

If we forget for a minute about differences between /by-module/ and /by-authors/id/ and decide what /id/ always contain mostly up-to-date modules, then why not just download listings of all subdirectories in /id/ to get correct and reliable list of modules? I've just did this: current size of all downloaded listings (in html) is 18MB, gzip'ed size is 1.2MB (I hope cpan.org's website has mod_gzip installed and all these listings was downloading gzip'ed). I don't see why CPAN.pm don't download these 1.2MB - it's not too much even on 33.6 Kbps modem! If cpan.org will run simple cron-script once per day which will prepare list of all modules in single .txt file, then this file size will be 900KB or even 167KB gzip'ed.

So, you see, it isn't too complex to make this task reliable. And, you see, CPAN.pm and CPANPLUS.pm doesn't reliable tools. So, is there reliable tool for this task? Or we should reinvent this wheel one more time? :-(

Replies are listed 'Best First'.
Re^3: howto install modules
by randyk (Parson) on Oct 11, 2005 at 00:39 UTC

    You're right that some mirrors contain more files than others, and it's probably a configuration issue; for rsync, for example, one would have to enable the --delete flag.

    It's important to distinguish the CPAN.pm/CPANPLUS.pm tools from the CPAN/PAUSE indices living under $CPAN/authors/ and $CPAN/modules/; the tools are just following what's in the indices, and so aren't "broken" in this respect. As you say, it would be possible to go through all distributions on CPAN, extract out the included modules, and make up a set of indices containing the latest versions, irrespective of who the owner is according to the CPAN/PAUSE indices (search.cpan.org does this, to an extent). However, using such a set of indices to install a module with CPAN/CPANPLUS would break the fundamental assumption of unique module names, and would lead to a situation whereby, for example, one author can overwrite another author's module just by uploading a later version to CPAN. There are plans in perl6 to address this - see, for example, CPAN, Perl6, and module versioning - but for now, module ownership/co-ownership is a safeguard put in place to prevent such a situation.

      Thanks again, excelent explanation.

      But I don't see relation between these two tasks: assurance in unique module names and access to modules. For example, search.cpan.org use different way for accessing modules because it doesn't show Smart::Comment on http://search.cpan.org/~autrijus/ (there no 0.01 version of Smart::Comments on search.cpan.org at all) but show all Conway's versions.

      Anyway, thanks again for your answers. Situation is now clear for me: problem with Smart::Comments and CPAN.pm has deep roots in CPAN architecture which nobody will try to fix until Perl6. :) It's easy to workaround this issue by using manually prepared module list from CPAN's directory listings, but this may result in some other unusual bugs.