in reply to Re: Searching for Modules and Descriptions on CPAN Remotely
in thread Searching for Modules and Descriptions on CPAN Remotely

How annoying!!!!

Just when I thought I'd nailed it, CPANPLUS::Backend is just like the others I mentioned, it only returns descriptions of registered modules!

Walking the road to enlightenment... I found a penguin and a camel on the way.....
Fancy a yourname@perl.me.uk? Just ask!!!
  • Comment on Re^2: Searching for Modules and Descriptions on CPAN Remotely

Replies are listed 'Best First'.
Re^3: Searching for Modules and Descriptions on CPAN Remotely
by adrianh (Chancellor) on Jan 23, 2006 at 13:56 UTC
    Just when I thought I'd nailed it, CPANPLUS::Backend is just like the others I mentioned, it only returns descriptions of registered modules!

    Can you define (and give an example module) of a non-registered module that you expect to appear? For example my Test::Class isn't registered and it appears in the list.

      I am searching for all the Catalyst::Plugin::* modules.

      They all appear, but because most of the authors haven't registered the namespace, the descriptions don't show:

      use strict; use warnings; use Carp; use Regexp::DefaultFlags; use CPANPLUS::Backend; my $cb = CPANPLUS::Backend->new or croak "Can't create new CPANPLUS::Backend object"; my @cat_plugins = $cb->search( type => 'module', allow => [ qr/\A Cata +lyst::Plugin/ ], ); for my $plugin (@cat_plugins) { print $plugin->name, "\n"; print $plugin->description, "\n"; }

      Walking the road to enlightenment... I found a penguin and a camel on the way.....
      Fancy a yourname@perl.me.uk? Just ask!!!
        They all appear, but because most of the authors haven't registered the namespace, the descriptions don't show

        Ah. Light dawns. Apologies for being dense.

        The description field is part of the metadata associated with registered modules - so it won't exist for non registered ones.

        Can you give an example of the text that search.cpan is showing for non-registered modules that you thought was the module description?

        My guess is that it's something that's been extracted from the SYNOPSIS or DESCRIPTION sections of the POD - in which case you're going to be screen scraping search.cpan, or downloading and extracting the POD from the distribution.