Slash Boxes
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 ]

ferreira (5993)

  (email not shown publicly)

Just another Brazilian Perl hacker.

Journal of ferreira (5993)

Monday January 14, 2008
05:51 PM


[ #35388 ]

WWW::CPAN is a work in progress (slow progress, to be honest). At 0.004 release, its API got one more method, query(). The whole API is:

  • new - good old constructor
  • fetch_distmeta - grab META.yml (META.json) from CPAN distributions
  • query - do simple queries and get the result as Perl data

Ain't that promising? Everyone will use it when 0.999 release arrives. (Yes, updates are by +0.001 increments.)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Hi Adriano,

    I was reading WWW::CPAN API, and I have one suggestion to the API: change the method name fetch_distmeta() to get_meta().

    This reflects the fact that you're dealing with CPAN, and the word 'meta' is used by modules on CPAN, so you can avoid the word 'dist' there - CPAN deals with software distribution. And fetch IMHO seems to be too related with the medium (and it is longer than get).

    For example:

    my $cpan = WWW::CPAN->new;
    my $meta = $cpan->get_meta({ dist => 'WWW::CPAN' });

    Is more clear an
    Igor Sutton
    • Those sound like very elegant ideas and I will think harder about them in the next days. The reason I went with "fetch_distmeta" was to anticipate the occurrence of other meta data beyond CPAN distributions, like authors. And "fetch" was chosen instead of "get" because the latter reminded me only simple accessor rather than a real action to retrieve some data. But I am thinking about it. Thanks for your feedback, Igor.