Adriano Ferreira > WWW-CPAN > cpanq

Download:
WWW-CPAN-0.011.tar.gz

Annotate this POD

CPAN RT

New  4
Open  0
View/Report Bugs
Source  

NAME ^

cpanq - A CLI interface to WWW::CPAN

SYNOPSIS ^

  cpanq search Foo
  cpanq search query=File::Temp mode=all

  cpanq meta Foo
  cpanq meta dist=WWW-CPAN version=0.003

DESCRIPTION ^

This script runs a simple interface to execute API methods of WWW::CPAN via the command line. Currently, this is a work in progress and offered more like an example code for WWW::CPAN.

The actual implementation code lives in the module App::WWW::CPAN.

The expected arguments for the script are like:

  command single-arg
  command key1=val1 key2=val2

where the supported commands by now are search and meta.

  search Foo # translates to WWW::CPAN->search('Foo')
  search query=File::Temp mode=all # WWW::CPAN->search({ query => 'File::Temp', mode => 'all' });

  meta Foo # WWW::CPAN->fetch_distmeta('Foo');
  meta dist=WWW-CPAN version=0.003 # WWW::CPAN->fetch_distmeta({ dist => 'WWW-CPAN', version => '0.003' })

There are also the synonym commands: query which is the same as search and distmeta an alias of meta.

The results are dumped with the help of Data::Dump::Streamer into STDOUT.

FEATURES ^

Since 0.007 version, cpanq uses a cache to avoid hitting search.cpan.org with the same query in a very short time period. This cache lives at ~/.cpanq (or platform-equivalent home directory). The expiration actually happens after 10 minutes.

OPTIONS ^

(None yet)

SEE ALSO ^

  WWW::CPAN
  App::WWW::CPAN

BUGS ^

Please report bugs via CPAN RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-CPAN or mailto://bugs-WWW-CPAN@rt.cpan.org.

AUTHORS ^

Adriano R. Ferreira, <ferreira@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (C) 2007, 2008 by Adriano R. Ferreira

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: