App-CPANIDX
view release on metacpan or search on metacpan
"<cmd">
The command may be one of the following:
"mod"
Takes a search term which is a module name to search for.
Returns information relating to that module if it exists.
curl -i http://name.of.website/cpanidx/yaml/mod/LWP
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:34:07 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: GAAS
dist_file: G/GA/GAAS/libwww-perl-5.834.tar.gz
dist_name: libwww-perl
dist_vers: 5.834
mod_name: LWP
mod_vers: 5.834
"dist"
Takes a search term which is a distribution name to search for.
Returns information relating to that distribution if it exists.
curl -i http://name.of.website/cpanidx/yaml/dist/CPANPLUS-Dist-Build
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Mon, 06 Sep 2010 14:02:23 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: BINGOS
dist_file: B/BI/BINGOS/CPANPLUS-Dist-Build-0.48.tar.gz
dist_name: CPANPLUS-Dist-Build
dist_vers: 0.48
"auth"
Takes a search term which is the CPAN ID of an author to search
for. Returns information relating to that author if they exist.
curl -i http://name.of.website/cpanidx/yaml/auth/BINGOS
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:36:13 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: BINGOS
email: chris@bingosnet.co.uk
fullname: 'Chris Williams'
"dists"
Takes a search term which is the CPAN ID of an author. Returns a
list of distributions that author has on CPAN.
curl -i http://name.of.website/cpanidx/yaml/dists/BINGOS
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:39:14 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: BINGOS
dist_file: B/BI/BINGOS/POE-Filter-LZO-1.70.tar.gz
dist_name: POE-Filter-LZO
dist_vers: 1.70
"perms"
Takes a search term which is a module name to search for.
Returns CPAN permissions relating to that module if it exists.
The permission is one of "m" for "modulelist", "f" for
"first-come" and "c" for "co-maint".
curl -i http://name.of.website/cpanidx/yaml/perms/POE::Component::SmokeBox::Dists
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:39:14 GMT
Server: lighttpd/1.4.25
---
-
mod_name: POE::Component::SmokeBox::Dists
cpan_id: BINGOS
perms: f
"timestamp"
Does not take a search term. Returns a timestamp of when the
CPAN Index Database was last updated and when the packages file
that was used was last updated. Both values are in epoch time.
curl -i http://name.of.website/cpanidx/yaml/timestamp
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 09 Jun 2010 10:16:15 GMT
Server: lighttpd/1.4.25
---
-
lastupdated: 1276075625
timestamp: 1276077865
"topten"
Does not take a search term. Returns a list of the authors with
the most distributions. This is not the most accurate, try
<http://thegestalt.org/simon/perl/wholecpan.html> for a more
accurate leaderboard.
curl -i http://name.of.website/cpanidx/yaml/topten
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:44:44 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: ADAMK
dists: 237
-
cpan_id: RJBS
cpan_id: MARCEL
dists: 114
"mirrors"
Does not take a search term. Returns a list of CPAN mirror sites
as listed in the "MIRRORED.BY" file.
curl -i http://name.of.website/cpanidx/yaml/mirrors
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Mon, 19 Apr 2010 14:52:52 GMT
Server: lighttpd/1.4.25
---
-
dst_bandwidth: STM-1
dst_contact: tenet.ac.za^aa
dst_ftp: ftp://cpan.mirror.ac.za/
dst_http: http://cpan.mirror.ac.za/
etc. etc.
"corelist"
Takes a search term which is a module name to search for.
Returns information if that module is shipped with perl core.
curl -i http://name.of.website/cpanidx/yaml/corelist/Class::ISA
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 06 May 2010 09:31:25 GMT
Server: lighttpd/1.4.25
---
-
deprecated: 0
mod_vers: 0.32
perl_ver: 5.007003
released: 2002-03-05
lib/App/CPANIDX.pm view on Meta::CPAN
=over
=item C<mod>
Takes a search term which is a module name to search for. Returns information relating to that module if it
exists.
curl -i http://name.of.website/cpanidx/yaml/mod/LWP
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:34:07 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: GAAS
dist_file: G/GA/GAAS/libwww-perl-5.834.tar.gz
dist_name: libwww-perl
dist_vers: 5.834
lib/App/CPANIDX.pm view on Meta::CPAN
mod_vers: 5.834
=item C<dist>
Takes a search term which is a distribution name to search for. Returns information relating to that
distribution if it exists.
curl -i http://name.of.website/cpanidx/yaml/dist/CPANPLUS-Dist-Build
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Mon, 06 Sep 2010 14:02:23 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: BINGOS
dist_file: B/BI/BINGOS/CPANPLUS-Dist-Build-0.48.tar.gz
dist_name: CPANPLUS-Dist-Build
dist_vers: 0.48
=item C<auth>
Takes a search term which is the CPAN ID of an author to search for. Returns information relating to that
author if they exist.
curl -i http://name.of.website/cpanidx/yaml/auth/BINGOS
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:36:13 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: BINGOS
email: chris@bingosnet.co.uk
fullname: 'Chris Williams'
=item C<dists>
Takes a search term which is the CPAN ID of an author. Returns a list of distributions that author has on
CPAN.
curl -i http://name.of.website/cpanidx/yaml/dists/BINGOS
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:39:14 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: BINGOS
dist_file: B/BI/BINGOS/POE-Filter-LZO-1.70.tar.gz
dist_name: POE-Filter-LZO
dist_vers: 1.70
lib/App/CPANIDX.pm view on Meta::CPAN
Takes a search term which is a module name to search for. Returns CPAN permissions relating to
that module if it exists.
The permission is one of C<m> for C<modulelist>, C<f> for C<first-come> and
C<c> for C<co-maint>.
curl -i http://name.of.website/cpanidx/yaml/perms/POE::Component::SmokeBox::Dists
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:39:14 GMT
Server: lighttpd/1.4.25
---
-
mod_name: POE::Component::SmokeBox::Dists
cpan_id: BINGOS
perms: f
=item C<timestamp>
Does not take a search term. Returns a timestamp of when the CPAN Index Database was last updated
and when the packages file that was used was last updated. Both values are in epoch time.
curl -i http://name.of.website/cpanidx/yaml/timestamp
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Wed, 09 Jun 2010 10:16:15 GMT
Server: lighttpd/1.4.25
---
-
lastupdated: 1276075625
timestamp: 1276077865
=item C<topten>
Does not take a search term. Returns a list of the authors with the most distributions. This is not the
most accurate, try L<http://thegestalt.org/simon/perl/wholecpan.html> for a more accurate leaderboard.
curl -i http://name.of.website/cpanidx/yaml/topten
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 04 Mar 2010 11:44:44 GMT
Server: lighttpd/1.4.25
---
-
cpan_id: ADAMK
dists: 237
-
cpan_id: RJBS
lib/App/CPANIDX.pm view on Meta::CPAN
cpan_id: MARCEL
dists: 114
=item C<mirrors>
Does not take a search term. Returns a list of CPAN mirror sites as listed in the C<MIRRORED.BY> file.
curl -i http://name.of.website/cpanidx/yaml/mirrors
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Mon, 19 Apr 2010 14:52:52 GMT
Server: lighttpd/1.4.25
---
-
dst_bandwidth: STM-1
dst_contact: tenet.ac.za^aa
dst_ftp: ftp://cpan.mirror.ac.za/
dst_http: http://cpan.mirror.ac.za/
lib/App/CPANIDX.pm view on Meta::CPAN
etc. etc.
=item C<corelist>
Takes a search term which is a module name to search for. Returns information if that module is shipped
with perl core.
curl -i http://name.of.website/cpanidx/yaml/corelist/Class::ISA
HTTP/1.1 200 OK
Content-type: application/x-yaml; charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 06 May 2010 09:31:25 GMT
Server: lighttpd/1.4.25
---
-
deprecated: 0
mod_vers: 0.32
perl_ver: 5.007003
released: 2002-03-05
lib/App/CPANIDX/Renderer.pm view on Meta::CPAN
use warnings;
use YAML::Tiny;
use JSON::XS;
use XML::Simple;
use HTML::Tiny;
use vars qw[$VERSION];
$VERSION = '0.40';
my %types = (
'yaml', 'application/x-yaml; charset=utf-8',
'json', 'application/json; charset=utf-8',
'xml', 'application/xml; charset=utf-8',
'html', 'text/html',
);
my %renderers = (
'yaml', sub {
my $ref = shift;
my $string;
eval { $string = YAML::Tiny::Dump( $ref ); };
return $string;
},
t/01_renderer.t view on Meta::CPAN
my $data = [
{
'email' => 'chris@bingosnet.co.uk',
'cpan_id' => 'BINGOS',
'fullname' => 'Chris Williams'
}
];
my %types = (
'yaml', 'application/x-yaml; charset=utf-8',
'json', 'application/json; charset=utf-8',
'xml', 'application/xml; charset=utf-8',
'html', 'text/html',
);
my @enc = App::CPANIDX::Renderer->renderers();
my @types = sort keys %types;
is_deeply( \@enc, \@types, 'We got the right renderers back' );
foreach my $enc ( qw(yaml json xml html) ) {
my $ren = App::CPANIDX::Renderer->new( $data, $enc );
( run in 0.264 second using v1.01-cache-2.11-cpan-4d50c553e7e )