Acme-CPANAuthors-CPAN-OneHundred

 view release on metacpan or  search on metacpan

examples/check100.pl  view on Meta::CPAN

=head1 NAME

check100.pl - checks the CPAN 100 list and returns differences

=head1 SYNOPSIS

  perl check100.pl

=head1 DESCRIPTION

Downloads the latest copy of the cpan100.csv file from CPAN Testers Statistics
site. Compares with the previous download, and prints the differences.

=cut

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

use File::Basename;
use Text::Diff;
use WWW::Mechanize;

examples/check100.pl  view on Meta::CPAN

# Variables

# -------------------------------------
# Program

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;

examples/update100.pl  view on Meta::CPAN

=head1 NAME

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;

examples/update100.pl  view on Meta::CPAN

# Program

GetOptions(\%options, 'local', 'build', 'release') or die "Usage: $0 [--local] [--build] [--release]\n";

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

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+$//;



( run in 3.333 seconds using v1.01-cache-2.11-cpan-364913b4093 )