Acme-MetaSyntactic-cpanauthors
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic/cpanauthors.pm view on Meta::CPAN
package Acme::MetaSyntactic::cpanauthors;
$Acme::MetaSyntactic::cpanauthors::VERSION = '1.001';
use strict;
use Acme::MetaSyntactic::MultiList;
use Acme::CPANAuthors;
our @ISA = qw( Acme::MetaSyntactic::MultiList );
my %names = (
map {
lc $_ => map { tr/-/_/; $_ } join ' ', Acme::CPANAuthors->new($_)->id
} Acme::CPANAuthors->_list_categories()
);
# protect against empty categories (Acme::CPANAuthors::Dutch)
delete $names{$_} for grep !$names{$_}, keys %names;
__PACKAGE__->init( { default => ':all', names => \%names } );
1;
my @categories = sort Acme::MetaSyntactic::cpanauthors->categories;
plan tests => 2 * @categories;
for my $category (@categories) {
is( $category, lc $category, "$category is in lowercase" );
my $acme = Acme::MetaSyntactic::cpanauthors->new( category => $category );
is_deeply(
[ sort $acme->name(0) ],
[ map uc, sort $acme->name(0) ],
"names in $category are all in uppercase"
);
}
( run in 0.643 second using v1.01-cache-2.11-cpan-49f99fa48dc )