CPAN Search = Confusing

phillup on 2004-06-29T18:19:31

Sometimes the search results from CPAN are pretty confusing to me, and very hard to explain to someone who has not used it before. (Which I'm preparing to do in a few weeks. Let's call it a case of the blind leading the blind... but, I need to explain the software I've written to some employees of a customer.)

I like to use my laptop to view documentation while programming on my other computer (instead of pulling up the local copy on the computer I'm doing the programming on). So, I'll often head over to CPAN to pull up documentation on a module. Today I went over to look at the docs for Test::Harness and started with a search to find the module. (Note that your search results may be different...)

This was the first module listed, and here was the second one. Notice the second one is the most recent, according to the version numbers.

I'm not completely sure, but... it looks like the first one is simply bundled with the POE module. Which kind of makes me wonder... should it really show up in the search?

More importantly, should it show up ahead of the stand alone version?

I thought that perhaps CPAN was ordering by date, but Test::Harness::Straps (which was in the search results) is not listed in date order. So, I'm not exactly sure what order the search results are listed in.

Note that the above was with the "in" dropdown selector in it's default "all" position.

It seems that what I really wanted was to set it to "distributions" or "modules"... I can't really tell the difference, or find documentation explaining what the distinction is.


dist v module

rjbs on 2004-06-29T18:53:50

A distribution is a bundle of stuff packaged together. For example, to install Test::More, I'd want to install the Test-Simple distribution. Test-Simple also includes Test::Simple, Test::Builder, and the Test::Tutorial documentation. A distribution usually has the name as one of its key modules, with the double colons replaced with single hyphens. That's not always true, though. LWP::UserAgent is in the distribution libwww-perl.

In general, you want a module or two, so you install the distribution in which it's bundled.

I'm sure this could be explained better. And maybe it will be. But not by me, right now.

Re:dist v module

phillup on 2004-06-29T20:08:06

I'm sure this could be explained better. And maybe it will be. But not by me, right now.

Hey, I'm better off with that explanation than I was.

Thanks!

I played around a bit with the searching using 'File::Find' as a test case. It did not show up (at least not on the first page) while searching in distributions, but did when searching in modules.

So, I gather that if I'm looking for a specific module, use the in module search. Which, seems pretty straight forward.

That makes the search results when using the 'all' scope a bit more bizarre to me, because there is obviously info to tell if something is a module. It just seems to me that the module should be listed first if the search request matches the module name exactly.

It would be really nice to know how the results are sorted.