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

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.

  • Comment on Re^3: Searching for Modules and Descriptions on CPAN Remotely

Replies are listed 'Best First'.
Re^4: Searching for Modules and Descriptions on CPAN Remotely
by ghenry (Vicar) on Jan 23, 2006 at 14:12 UTC

    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.

        Yeah, I've now figured that out.

        If you search for Catalyst::Plugin, you can see the results.

        I just want the module name and the text directly below the link result.

        Looks like I'll be turning to WWW::Mechanize after all :-(

        Walking the road to enlightenment... I found a penguin and a camel on the way.....
        Fancy a yourname@perl.me.uk? Just ask!!!