Acme-CPANAuthors
view release on metacpan or search on metacpan
0.17 2011/10/18
- listed several new modules: British, India, Swedish
- website announcement
0.16 2011/03/09
- listed several new modules: DualLife, GitHub, Search
- ignore Search while looking for authors
0.15 2011/03/05
- tweaked end of line handling
- better API server error handling (RT #66394, thanks to ANDK)
0.14 2010/09/30
- stopped trying hard to find cpan mirror in the hard drive,
and try downloading index files if necessary.
Set ACME_CPANAUTHORS_HOME environmental variable to use local
indices.
0.13 2010/09/26
- forgot to remove Parse::CPAN::* bit in a test
lib/Acme/CPANAuthors/Utils/Kwalitee.pm view on Meta::CPAN
$ua;
}
sub fetch {
my ($class, $id) = @_;
return unless $id;
my $res = $class->_ua->get(_uri(lc $id));
unless ($res->{success} && $res->{status} == 200) {
$class->_error("$res->{status} $res->{reason}");
}
my $json = eval { JSON::PP::decode_json($res->{content}) };
if ($@) {
$class->_error($@);
}
return $json;
}
sub _error {
my ($class, $error) = @_;
die "API SERVER ERROR\n"
. "Couldn't parse kwalitee info from the api server\n"
. " $error\n"
. "Sorry for the inconvenience. If this lingers long,\n"
. "please drop a line to <ishigaki\@cpan.org>.\n";
}
1;
__END__
=head1 NAME
t/08_inline_package.t view on Meta::CPAN
package # hide from pause
Acme::CPANAuthors::TestInline;
use Acme::CPANAuthors::Register (
ISHIGAKI => 'Kenichi Ishigaki',
);
package main;
use Acme::CPANAuthors;
my $authors = eval { Acme::CPANAuthors->new('TestInline') };
ok !$@, "no errors";
ok $authors && $authors->name('ISHIGAKI') eq 'Kenichi Ishigaki', "got a correct name";
( run in 1.010 second using v1.01-cache-2.11-cpan-49f99fa48dc )