cpanq - A CLI interface to WWW::CPAN
cpanq search Foo cpanq search query=File::Temp mode=all cpanq meta Foo cpanq meta dist=WWW-CPAN version=0.003
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.
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.
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.
(None yet)
WWW::CPAN App::WWW::CPAN
Please report bugs via CPAN RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-CPAN or mailto://bugs-WWW-CPAN@rt.cpan.org.
Adriano R. Ferreira, <ferreira@cpan.org>
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.
To install WWW::CPAN, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::CPAN
CPAN shell
perl -MCPAN -e shell install WWW::CPAN
For more information on module installation, please visit the detailed CPAN module installation guide.