Acme-CPANAuthors
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
- fixed example in ::Utils (ETHER)
- not to require packages if ->author is available
0.21 2013/05/31
- new author lists added (ETHER)
- avatar_url falls back to <id>@cpan.org when no match is found from
the email address (ETHER)
- warning is issued when trying to fetch a gravatar when Gravatar::URL is
not installed; Gravatar::URL added to recommended prereqs (ETHER)
- id() now always assumes list context for the caller (ETHER)
- added repository information to metadata
0.20 2012/11/01
- listed new module: Czech
- various pod fixes
- Gravatar::URL is now optional
0.19 2012/03/10
- no redefine warning
- listed new module: Catalonian
lib/Acme/CPANAuthors/Factory.pm view on Meta::CPAN
package Acme::CPANAuthors::Factory;
use strict;
use warnings;
use Acme::CPANAuthors;
sub create {
my ($class, %data) = @_;
my @categories = keys %data;
my %authors = map { %{ $data{$_} } } @categories;
return bless {
categories => \@categories,
authors => \%authors,
}, 'Acme::CPANAuthors';
}
1;
__END__
lib/Acme/CPANAuthors/Utils/Packages.pm view on Meta::CPAN
my $package = $packages->package('Acme::CPANAuthors');
my $dist = $packages->distribution('I/IS/ISHIGAKI/Acme-CPANAuthors-0.12.tar.gz');
my $latest = $packages->latest_distribution('Acme-CPANAuthors');
=head1 DESCRIPTION
This is a subset of L<Parse::CPAN::Packages>. The reading
methods are similar in general (accessors are marked as
read-only, though). Internals and data-parsing methods may
be different, but you usually don't need to care.
=head1 METHODS
=head2 new
always takes a file name (both raw C<.txt> file and C<.txt.gz>
file name are acceptable). Raw content of the file is not
acceptable.
t/03_extra.t view on Meta::CPAN
use Test::More;
use Acme::CPANAuthors;
BEGIN {
eval {require Gravatar::URL; 1} or
plan skip_all => "this test requires Gravatar::URL";
}
plan tests => 1;
local $ENV{ACME_CPANAUTHORS_HOME} = 't/data';
my $authors = Acme::CPANAuthors->new('TestExtra');
my $avatar_url = $authors->avatar_url('AADLER');
ok $avatar_url;
t/06_parse_mailrc.t view on Meta::CPAN
# this test is ripped from Parse::CPAN::Authors
use strict;
use warnings;
#use lib 'lib';
#use IO::Zlib;
#use Test::Exception;
use Test::More tests => 23;
use_ok('Acme::CPANAuthors::Utils::Authors');
my $filename = "t/data/authors/01mailrc.txt";
my $gzfilename = "t/data/authors/01mailrc.txt.gz";
#my $fh = IO::Zlib->new( $gzfilename, "rb" )
# || die "Failed to read $filename: $!";
#my $contents = join '', <$fh>;
#$fh->close;
# try with no filename - not supported
#chdir "t";
#my $p = Acme::CPANAuthors::Utils::Authors->new();
#is_fine($p);
t/07_parse_packages.t view on Meta::CPAN
# this test is ripped from Parse::CPAN::Packages
use strict;
use warnings;
use Test::More tests => 34;
use_ok("Acme::CPANAuthors::Utils::Packages");
my $p = Acme::CPANAuthors::Utils::Packages->new("t/data/modules/02packages.details.txt");
isa_ok( $p, "Acme::CPANAuthors::Utils::Packages" );
my @packages = sort map { $_->package } $p->packages;
is_deeply(
\@packages,
[ qw(Acme::Colour Acme::Colour::Old Acme::ComeFrom Acme::Comment Acme::CramCode Acme::Currency accessors accessors::chained accessors::classic )
]
);
is( $p->file, '02packages.details.txt', 'file' );
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.591 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )