view release on metacpan or search on metacpan
Changes
examples/count_slovak_cpan_authors.pl
examples/fetch_slovak_cpan_authors.pl
inc/Module/Install.pm
inc/Module/Install/AuthorRequires.pm
inc/Module/Install/AuthorTests.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
inc/Module/Install/Fetch.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/ReadmeFromPod.pm
inc/Module/Install/Win32.pm
LICENSE
Makefile.PL
MANIFEST This list of files
META.yml
README
SIGNATURE
Slovak.pm
t/Acme-CPANAuthors-Slovak/01-use.t
t/Acme-CPANAuthors-Slovak/02-version.t
t/Acme-CPANAuthors-Slovak/03-new.t
t/Acme-CPANAuthors-Slovak/04-authors.t
t/Acme-CPANAuthors-Slovak/05-count.t
t/Acme-CPANAuthors-Slovak/06-id.t
xt/Acme-CPANAuthors-Slovak/01-pod_coverage.t
xt/Acme-CPANAuthors-Slovak/02-pod.t
---
abstract: 'We are Slovak CPAN authors.'
author:
- 'Michal Josef Spacek <skim@cpan.org>'
build_requires:
ExtUtils::MakeMaker: 6.59
Test::More: 0
Test::NoWarnings: 0
configure_requires:
ExtUtils::MakeMaker: 6.59
distribution_type: module
dynamic_config: 1
generated_by: 'Module::Install version 1.21'
Makefile.PL view on Meta::CPAN
use lib '.';
use strict;
use warnings;
use inc::Module::Install;
# Definition.
abstract 'We are Slovak CPAN authors.';
author 'Michal Josef Spacek <skim@cpan.org>';
author_requires 'English' => 0;
author_requires 'File::Object' => 0.05;
author_requires 'Test::Pod' => 0;
author_requires 'Test::Pod::Coverage' => 0;
license 'bsd';
name 'Acme-CPANAuthors-Slovak';
perl_version 5.0100;
readme_from 'Slovak.pm';
recursive_author_tests('xt');
requires 'Acme::CPANAuthors' => 0;
resources 'bugtracker' => 'https://github.com/michal-josef-spacek/Acme-CPANAuthors-Slovak/issues';
resources 'homepage' => 'https://github.com/michal-josef-spacek/Acme-CPANAuthors-Slovak';
resources 'repository' => 'git://github.com/michal-josef-spacek/Acme-CPANAuthors-Slovak';
test_requires 'Test::NoWarnings' => 0;
test_requires 'Test::More' => 0;
tests_recursive;
version '0.28';
# Run.
NAME
Acme::CPANAuthors::Slovak - We are Slovak CPAN authors.
SYNOPSIS
use Acme::CPANAuthors;
my $authors = Acme::CPANAuthors->new('Slovak');
my $url = $authors->avatar_url('PALI');
my $number = $authors->count;
my @distors = $authors->distributions('JKUTEJ');
my @ids = $authors->id;
my $kwalitee = $authors->kwalitee('BARNEY');
my $name = $authors->name('PALI');
DESCRIPTION
See documentation for Acme::CPANAuthors for more details.
EXAMPLE1
use strict;
use warnings;
use Acme::CPANAuthors;
# Create object.
my $authors = Acme::CPANAuthors->new('Slovak');
# Get number of Slovak CPAN authors.
my $count = $authors->count;
# Print out.
print "Count of Slovak CPAN authors: $count\n";
# Output:
# Count of Slovak CPAN authors: 6
EXAMPLE2
use strict;
use warnings;
use Acme::CPANAuthors;
use Data::Printer;
# Create object.
my $authors = Acme::CPANAuthors->new('Slovak');
# Get all ids.
my @ids = $authors->id;
# Print out.
p @ids;
# Output:
# [
# [0] "BARNEY",
# [1] "JKUTEJ",
# [2] "KOZO",
# [3] "LKUNDRAK",
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
SHA256 0c3fdf94cb5b8e6e2cf0e319e70b7bd99c30c3635b49328144471e021fe25dc3 Changes
SHA256 f2e4872487ee11343bf1d37e483f1138b8936f428c7d9cd1aecc757cb75bb99b LICENSE
SHA256 acc6e569e52132f1167006e81022680cd73b64adc37c5d09c4210484095a0c50 MANIFEST
SHA256 fa02f568b723229fd19eb5c226d516ddb6802b6f5a5b7022798bffc51580039e META.yml
SHA256 a703e808fc8866b6c7664a0f952fb723f274e39bc06969ec4166521f685c185e Makefile.PL
SHA256 efec1f48635ffee15ed61faa14cef695c923379f9fb752913a293800339ecbfd README
SHA256 f43969e612a178588e5b8f8db4efd611e6b2fa727cc0174efb8f184f4e606e2c Slovak.pm
SHA256 ade8dd3da79e8f9cbfbccf6b6dfe2f14ff5deff5687a597086ea0f0ecc5db288 examples/count_slovak_cpan_authors.pl
SHA256 cf71926f9aa951d8989427e7e044fd34cca6b1a72d9d2ad1a1aca310269109ad examples/fetch_slovak_cpan_authors.pl
SHA256 cd5397bbe618f5bbd4e12a33b0cf5d21114e771c2dbd0ce28e2135beb52c35a8 inc/Module/Install.pm
SHA256 8bd506c33fb78f10f6451413e931ca23541fcc4eebe05fcb7c7c9577341223c4 inc/Module/Install/AuthorRequires.pm
SHA256 1b5430a46a35142ef8914d8c745196fca825defc9dfa7e389299bf294613825e inc/Module/Install/AuthorTests.pm
SHA256 798836f9ccb8d204b1be31fc3835631f57e9d818b21a8f0d14bfcfb82ff4a72a inc/Module/Install/Base.pm
SHA256 d64cd4c16f83c5baf11f64a44bea3a0abc060a49da5aba040f0eb01394bf75ab inc/Module/Install/Can.pm
SHA256 65d7a6098bf3f829e8c1c2865476d3537aa6f0ad0ffc9149e10812c856529043 inc/Module/Install/Fetch.pm
SHA256 70c4b77acab3ff51dfb318110369607cb109e1c319459249623b787cf3859750 inc/Module/Install/Makefile.pm
SHA256 14556386168007ce913e669fc08a332ccdb6140246fd55a90c879b5190c1b57a inc/Module/Install/Metadata.pm
SHA256 53825bc78e4c910b888160bc148c8bc211be58e02b99c8edcbf4854f95faa049 inc/Module/Install/ReadmeFromPod.pm
SHA256 4c746c02c5cc19bed4c352e76205b4adff4c45ce8310d71294e1b83c059659c2 inc/Module/Install/Win32.pm
SHA256 d3d9b4583243c470ae895defa4c44564485b53693cba1c50ab0320768f443e97 inc/Module/Install/WriteAll.pm
SHA256 2697804e3dfa8669ada9a059ea72a50e7d78eb9026e0da6fc06ffc8c669f1866 t/Acme-CPANAuthors-Slovak/01-use.t
SHA256 420efa73416ac57594624c9806bb12b67eb549796d5fc5b27fa72d0feb310512 t/Acme-CPANAuthors-Slovak/02-version.t
SHA256 e45c7a6d8995b87d8b9ca8aa738851f12d81ba08b31f818c9512d3d176d5d19e t/Acme-CPANAuthors-Slovak/03-new.t
SHA256 468597bdf8f2ddf9aafe16d78aba91d1dd39df0d43d1c9340c4b1f554f0c9634 t/Acme-CPANAuthors-Slovak/04-authors.t
SHA256 122a908ba7c3eeefd0c4461f422c7b60b0014b77afe94773ad72d736e319bec7 t/Acme-CPANAuthors-Slovak/05-count.t
SHA256 0ff0379ee9e11efe3f6baaf6c0f3f636adbc7dccb64a9f67d496c0cf0edba475 t/Acme-CPANAuthors-Slovak/06-id.t
SHA256 0ed63d6d962897caf6ddd0911051a197b2a095b9a5a791df3920af25e4db691e xt/Acme-CPANAuthors-Slovak/01-pod_coverage.t
SHA256 6074a30a38033602e6743ea57d096f0581f8c3241ab89fc6ce339985de595345 xt/Acme-CPANAuthors-Slovak/02-pod.t
-----BEGIN PGP SIGNATURE-----
iQIzBAEBAwAdFiEEbEiOwSagsghKcON6ojV9Rpe/B8sFAmSXFBwACgkQojV9Rpe/
B8sJwQ//d2TGdZMAESTLe+7BVC2cWzz7B7n607N05xon+XyHCkAndOReXBBlEUA2
Ap4ayE7vGADtWC4VBe5AGLZZE+CP3v8mTuKTwocLdC6c0zsfx3UXf4KSW+VzPhc4
vU3VCNpg5Hja0ugnkZGYQmI6Cbq5/jBbulHCynU13qRG2SbPAOeQ1ESYvjcqSDEL
1;
__END__
=pod
=encoding utf8
=head1 NAME
Acme::CPANAuthors::Slovak - We are Slovak CPAN authors.
=head1 SYNOPSIS
use Acme::CPANAuthors;
my $authors = Acme::CPANAuthors->new('Slovak');
my $url = $authors->avatar_url('PALI');
my $number = $authors->count;
my @distors = $authors->distributions('JKUTEJ');
my @ids = $authors->id;
my $kwalitee = $authors->kwalitee('BARNEY');
my $name = $authors->name('PALI');
=head1 DESCRIPTION
See documentation for L<Acme::CPANAuthors> for more details.
=head1 EXAMPLE1
=for comment filename=count_slovak_cpan_authors.pl
use strict;
use warnings;
use Acme::CPANAuthors;
# Create object.
my $authors = Acme::CPANAuthors->new('Slovak');
# Get number of Slovak CPAN authors.
my $count = $authors->count;
# Print out.
print "Count of Slovak CPAN authors: $count\n";
# Output:
# Count of Slovak CPAN authors: 6
=head1 EXAMPLE2
=for comment filename=fetch_slovak_cpan_authors.pl
use strict;
use warnings;
use Acme::CPANAuthors;
use Data::Printer;
# Create object.
my $authors = Acme::CPANAuthors->new('Slovak');
# Get all ids.
my @ids = $authors->id;
# Print out.
p @ids;
# Output:
# [
# [0] "BARNEY",
# [1] "JKUTEJ",
# [2] "KOZO",
# [3] "LKUNDRAK",
examples/count_slovak_cpan_authors.pl view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Acme::CPANAuthors;
# Create object.
my $authors = Acme::CPANAuthors->new('Slovak');
# Get number of Slovak CPAN authors.
my $count = $authors->count;
# Print out.
print "Count of Slovak CPAN authors: $count\n";
# Output:
# Count of Slovak CPAN authors: 6
examples/fetch_slovak_cpan_authors.pl view on Meta::CPAN
#!/usr/bin/env perl
use strict;
use warnings;
use Acme::CPANAuthors;
use Data::Printer;
# Create object.
my $authors = Acme::CPANAuthors->new('Slovak');
# Get all ids.
my @ids = $authors->id;
# Print out.
p @ids;
# Output:
# [
# [0] "BARNEY",
# [1] "JKUTEJ",
# [2] "KOZO",
# [3] "LKUNDRAK",
inc/Module/Install.pm view on Meta::CPAN
#line 1
package Module::Install;
# For any maintainers:
# The load order for Module::Install is a bit magic.
# It goes something like this...
#
# IF ( host has Module::Install installed, creating author mode ) {
# 1. Makefile.PL calls "use inc::Module::Install"
# 2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install
# 3. The installed version of inc::Module::Install loads
# 4. inc::Module::Install calls "require Module::Install"
# 5. The ./inc/ version of Module::Install loads
# } ELSE {
# 1. Makefile.PL calls "use inc::Module::Install"
# 2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install
# 3. The ./inc/ version of Module::Install loads
# }
inc/Module/Install.pm view on Meta::CPAN
#-------------------------------------------------------------
unless ( -f $self->{file} ) {
foreach my $key (keys %INC) {
delete $INC{$key} if $key =~ /Module\/Install/;
}
local $^W;
require "$self->{path}/$self->{dispatch}.pm";
File::Path::mkpath("$self->{prefix}/$self->{author}");
$self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self );
$self->{admin}->init;
@_ = ($class, _self => $self);
goto &{"$self->{name}::import"};
}
local $^W;
*{"${who}::AUTOLOAD"} = $self->autoload;
$self->preload;
inc/Module/Install.pm view on Meta::CPAN
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
Unknown function is found at $file line $line.
Execution of $file aborted due to runtime errors.
If you're a contributor to a project, you may need to install
some Module::Install extensions from CPAN (or other repository).
If you're a user of a module, please contact the author.
EOT
}
my $method = $1;
if ( uc($method) eq $method ) {
# Do nothing
return;
} elsif ( $method =~ /^_/ and $self->can($method) ) {
# Dispatch to the root M:I class
return $self->$method(@_);
}
inc/Module/Install.pm view on Meta::CPAN
my $base_path = Cwd::abs_path($FindBin::Bin);
unless ( Cwd::abs_path(Cwd::getcwd()) eq $base_path ) {
delete $args{prefix};
}
return $args{_self} if $args{_self};
$base_path = VMS::Filespec::unixify($base_path) if $^O eq 'VMS';
$args{dispatch} ||= 'Admin';
$args{prefix} ||= 'inc';
$args{author} ||= ($^O eq 'VMS' ? '_author' : '.author');
$args{bundle} ||= 'inc/BUNDLES';
$args{base} ||= $base_path;
$class =~ s/^\Q$args{prefix}\E:://;
$args{name} ||= $class;
$args{version} ||= $class->VERSION;
unless ( $args{path} ) {
$args{path} = $args{name};
$args{path} =~ s!::!/!g;
}
$args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm";
inc/Module/Install/AuthorRequires.pm view on Meta::CPAN
package Module::Install::AuthorRequires;
use base 'Module::Install::Base';
# cargo cult
BEGIN {
our $VERSION = '0.02';
our $ISCORE = 1;
}
sub author_requires {
my $self = shift;
return $self->{values}->{author_requires}
unless @_;
my @added;
while (@_) {
my $mod = shift or last;
my $version = shift || 0;
push @added, [$mod => $version];
}
push @{ $self->{values}->{author_requires} }, @added;
$self->admin->author_requires(@added);
return map { @$_ } @added;
}
1;
__END__
#line 92
inc/Module/Install/AuthorTests.pm view on Meta::CPAN
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
$VERSION = '0.002';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
#line 42
sub author_tests {
my ($self, @dirs) = @_;
_add_author_tests($self, \@dirs, 0);
}
#line 56
sub recursive_author_tests {
my ($self, @dirs) = @_;
_add_author_tests($self, \@dirs, 1);
}
sub _wanted {
my $href = shift;
sub { /\.t$/ and -f $_ and $href->{$File::Find::dir} = 1 }
}
sub _add_author_tests {
my ($self, $dirs, $recurse) = @_;
return unless $Module::Install::AUTHOR;
my @tests = $self->tests ? (split / /, $self->tests) : 't/*.t';
# XXX: pick a default, later -- rjbs, 2008-02-24
my @dirs = @$dirs ? @$dirs : Carp::confess "no dirs given to author_tests";
@dirs = grep { -d } @dirs;
if ($recurse) {
require File::Find;
my %test_dir;
File::Find::find(_wanted(\%test_dir), @dirs);
$self->tests( join ' ', @tests, map { "$_/*.t" } sort keys %test_dir );
} else {
$self->tests( join ' ', @tests, map { "$_/*.t" } sort @dirs );
}
inc/Module/Install/Makefile.pm view on Meta::CPAN
eval "use $perl_version; 1"
or die "ERROR: perl: Version $] is installed, "
. "but we need version >= $perl_version";
}
# Make sure we have a new enough MakeMaker
require ExtUtils::MakeMaker;
if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) {
# This previous attempted to inherit the version of
# ExtUtils::MakeMaker in use by the module author, but this
# was found to be untenable as some authors build releases
# using future dev versions of EU:MM that nobody else has.
# Instead, #toolchain suggests we use 6.59 which is the most
# stable version on CPAN at time of writing and is, to quote
# ribasushi, "not terminally fucked, > and tested enough".
# TODO: We will now need to maintain this over time to push
# the version up as new versions are released.
$self->build_requires( 'ExtUtils::MakeMaker' => 6.59 );
$self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 );
} else {
# Allow legacy-compatibility with 5.005 by depending on the
inc/Module/Install/Makefile.pm view on Meta::CPAN
} elsif ( $Module::Install::ExtraTests::use_extratests ) {
# Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness.
# So, just ignore our xt tests here.
} elsif ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) {
$args->{test} = {
TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ),
};
}
if ( $] >= 5.005 ) {
$args->{ABSTRACT} = $self->abstract;
$args->{AUTHOR} = join ', ', @{$self->author || []};
}
if ( $self->makemaker(6.10) ) {
$args->{NO_META} = 1;
#$args->{NO_MYMETA} = 1;
}
if ( $self->makemaker(6.17) and $self->sign ) {
$args->{SIGN} = 1;
}
unless ( $self->is_admin ) {
delete $args->{SIGN};
inc/Module/Install/Metadata.pm view on Meta::CPAN
};
my @resource_keys = qw{
homepage
bugtracker
repository
};
my @array_keys = qw{
keywords
author
};
*authors = \&author;
sub Meta { shift }
sub Meta_BooleanKeys { @boolean_keys }
sub Meta_ScalarKeys { @scalar_keys }
sub Meta_TupleKeys { @tuple_keys }
sub Meta_ResourceKeys { @resource_keys }
sub Meta_ArrayKeys { @array_keys }
foreach my $key ( @boolean_keys ) {
*$key = sub {
inc/Module/Install/Metadata.pm view on Meta::CPAN
# Some methods pull from POD instead of code.
# If there is a matching .pod, use that instead
my $pod = $file;
$pod =~ s/\.pm$/.pod/i;
$pod = $file unless -e $pod;
# Pull the different values
$self->name_from($file) unless $self->name;
$self->version_from($file) unless $self->version;
$self->perl_version_from($file) unless $self->perl_version;
$self->author_from($pod) unless @{$self->author || []};
$self->license_from($pod) unless $self->license;
$self->abstract_from($pod) unless $self->abstract;
return 1;
}
sub provides {
my $self = shift;
my $provides = ( $self->{values}->{provides} ||= {} );
%$provides = (%$provides, @_) if @_;
inc/Module/Install/Metadata.pm view on Meta::CPAN
my $self = shift;
my $perl_version=_extract_perl_version(Module::Install::_read($_[0]));
if ($perl_version) {
$self->perl_version($perl_version);
} else {
warn "Cannot determine perl version info from $_[0]\n";
return;
}
}
sub author_from {
my $self = shift;
my $content = Module::Install::_read($_[0]);
if ($content =~ m/
=head \d \s+ (?:authors?)\b \s*
([^\n]*)
|
=head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s*
.*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s*
([^\n]*)
/ixms) {
my $author = $1 || $2;
# XXX: ugly but should work anyway...
if (eval "require Pod::Escapes; 1") {
# Pod::Escapes has a mapping table.
# It's in core of perl >= 5.9.3, and should be installed
# as one of the Pod::Simple's prereqs, which is a prereq
# of Pod::Text 3.x (see also below).
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
defined $2
? chr($2)
: defined $Pod::Escapes::Name2character_number{$1}
? chr($Pod::Escapes::Name2character_number{$1})
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) {
# Pod::Text < 3.0 has yet another mapping table,
# though the table name of 2.x and 1.x are different.
# (1.x is in core of Perl < 5.6, 2.x is in core of
# Perl < 5.9.3)
my $mapping = ($Pod::Text::VERSION < 2)
? \%Pod::Text::HTML_Escapes
: \%Pod::Text::ESCAPES;
$author =~ s{ E<( (\d+) | ([A-Za-z]+) )> }
{
defined $2
? chr($2)
: defined $mapping->{$1}
? $mapping->{$1}
: do {
warn "Unknown escape: E<$1>";
"E<$1>";
};
}gex;
}
else {
$author =~ s{E<lt>}{<}g;
$author =~ s{E<gt>}{>}g;
}
$self->author($author);
} else {
warn "Cannot determine author info from $_[0]\n";
}
}
#Stolen from M::B
my %license_urls = (
perl => 'http://dev.perl.org/licenses/',
apache => 'http://apache.org/licenses/LICENSE-2.0',
artistic => 'http://opensource.org/licenses/artistic-license.php',
lgpl => 'http://opensource.org/licenses/lgpl-license.php',
bsd => 'http://opensource.org/licenses/bsd-license.php',
t/Acme-CPANAuthors-Slovak/04-authors.t view on Meta::CPAN
use strict;
use utf8;
use warnings;
use Acme::CPANAuthors::Slovak;
use Test::More 'tests' => 2;
use Test::NoWarnings;
# Test.
my %ret = Acme::CPANAuthors::Slovak->authors;
my %right_ret = (
'BARNEY' => 'Branislav ZahradnÃk',
'JKUTEJ' => 'Jozef Kutej',
'KOZO' => "Ján 'Kozo' Vajda",
'LKUNDRAK' => 'Lubomir Rintel',
'PALI' => 'Pavol Rohár',
'SAMSK' => 'Samuel Behan',
);
is_deeply(
\%ret,
\%right_ret,
'Slovak CPAN authors.',
);
t/Acme-CPANAuthors-Slovak/05-count.t view on Meta::CPAN
use strict;
use warnings;
use Acme::CPANAuthors;
use Test::More 'tests' => 2;
use Test::NoWarnings;
# Test.
my $obj = Acme::CPANAuthors->new('Slovak');
my $ret = $obj->count;
is($ret, 6, 'Count of Slovak CPAN authors.');
t/Acme-CPANAuthors-Slovak/06-id.t view on Meta::CPAN
use warnings;
use Acme::CPANAuthors;
use Test::More 'tests' => 2;
use Test::NoWarnings;
# Test.
my $obj = Acme::CPANAuthors->new('Slovak');
my @ret = $obj->id;
my @right_ret = ('BARNEY', 'JKUTEJ', 'KOZO', 'LKUNDRAK', 'PALI', 'SAMSK');
is_deeply(\@ret, \@right_ret, 'CPAN authors ids.');