Acme-CPANAuthors-CPAN-OneHundred

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

1.07    2015-02-20
        [New Authors]
        - SKIM, MLEHMANN

        [Updated Counts]
        - PERLANCAR, SHARYANTO, DAGOLDEN, ETHER, KENTNL, DROLSKY, PEVANS,
        - GUGOD,
        - RSAVAGE

1.06    2015-01-12
        - allow local data file in update script.

        [New Authors]
        - PERLANCAR, RSAVAGE

        [See You Again?]
        - MLEHMANN

        [Updated Counts]
        - RJBS, TOBYINK, SHARYANTO, FLORA, INGY, BINGOS, SMUELLER, DAGOLDEN,
        - ETHER, KENTNL, DROLSKY, PEVANS, GUGOD, BARBIE, SHLOMIF, SALVA, BDFOY

MANIFEST  view on Meta::CPAN

Changes
examples/author_info
examples/check100.pl
examples/count
examples/data/cpan100.csv
examples/templates/LICENSE
examples/templates/META.json
examples/templates/META.yml
examples/templates/README
examples/templates/lib/Acme/CPANAuthors/CPAN/OneHundred.pm
examples/templates/t/10cpanauthor.t
examples/update100.pl
lib/Acme/CPANAuthors/CPAN/OneHundred.pm
LICENSE
Makefile.PL

examples/check100.pl  view on Meta::CPAN


my $base = dirname($0);
chdir($base);
#print "dir=$base\n";

my $mech = WWW::Mechanize->new();
my $source = 'http://stats.cpantesters.org/stats/cpan100.csv';
my $target = basename($source);
$mech->mirror($source,$target);

my $file = 'data/cpan100.csv';

my $diff = diff $file, $target;
print $diff . "\n";

#unlink $target;

__END__

=head1 BUGS, PATCHES & FIXES

examples/update100.pl  view on Meta::CPAN

update100.pl - preps the OneHundred module for release, if required.

=head1 SYNOPSIS

  perl update100.pl

=head1 DESCRIPTION

Downloads the latest copy of the cpan100.csv file from CPAN Testers Statistics
site. Compares with the previous download, and if there is a change, takes the 
module template and inserts the appropriate data ready for the next release.

=cut

# -------------------------------------
# Library Modules

use CPAN::Changes;
#use Data::Dumper;
use DateTime;
use File::Basename;

examples/update100.pl  view on Meta::CPAN


unless($options{local}) {
    my $mech = WWW::Mechanize->new();
    my $source = 'http://stats.cpantesters.org/stats/cpan100.csv';
    my $target = basename($source);
    $mech->mirror($source,$target);
}

# read old file
my $inx = 0;
my $file = 'data/cpan100.csv';
if(my $fh = IO::File->new($file,'r')) {
    while(<$fh>) {
        s/\s+$//;
        next    if(not $_ or $_ =~ /^#/);
        my ($pause,$cnt,$name) = split(/,/);
        next unless($pause);

        $inx++;
        $old{$inx} = { count => $cnt, pause => $pause, name => $name };
        $pause{$pause} = $cnt;

examples/update100.pl  view on Meta::CPAN

my $parser = Template->new(\%config);        # initialise parser
for my $template (@files) {
    eval {
        # parse to text
        $parser->process($template,\%tvars,$template) or die $parser->error();
    };

    die "TT PARSER ERROR: eval=$@, error=" . $parser->error  if($@);
}

# now store new data
system("cp data/cpan100.csv data/cpan100.old.csv ");
system("mv cpan100.csv data");

if($options{build}) {
    # build tarball
    system("perl Makfile.PL");
    system("make dist");

    if($options{release}) {
        # submit tarball
        system("cpan-upload Acme-CPANAuthors-CPAN-OneHundred-$tvars{VERSION}.tar.gz");
    }



( run in 0.493 second using v1.01-cache-2.11-cpan-8d75d55dd25 )