Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added new (build|make)_cpan method

  • Loading branch information...
commit f98f202cdd5016a9403f1580060eba732549ef37 1 parent 72a7987
@barbie authored
View
1  Changes
@@ -5,6 +5,7 @@ Revision history for CPAN-Testers-WWW-Statistics
- added new distribution versions page.
- added submission rate graphs.
- reworked graph filename & path creation.
+ - added new (build|make)_cpan method.
1.12 2014-06-02
- added cpan/backpan 100 files to CPAN Stats page creation.
View
11 bin/cpanstats-writepages
@@ -2,7 +2,7 @@
use strict;
$|++;
-my $VERSION = '0.52';
+my $VERSION = '1.13';
#----------------------------------------------------------------------------
@@ -59,6 +59,7 @@ else {
if($options{leader}) { $stats->make_leaders(); }
if($options{noreports}) { $stats->make_noreports(); }
if($options{perform}) { $stats->make_performance(); }
+ if($options{cpan}) { $stats->make_cpan(); }
}
# -------------------------------------
@@ -98,6 +99,7 @@ sub init_options {
'leader|l',
'noreports|n',
'perform|p',
+ 'cpan',
'help|h',
'version|v'
@@ -107,7 +109,8 @@ sub init_options {
help(0) if($options{version});
$options{all} = 1
- unless($options{basics} || $options{update} || $options{matrix} || $options{stats} || $options{leader} || $options{noreports});
+ unless($options{basics} || $options{leader} || $options{noreports} || $options{stats}
+ || $options{update} || $options{matrix} || $options{perform} || $options{cpan});
}
sub help {
@@ -121,6 +124,7 @@ sub help {
print " [--address|a=<file>] \\\n";
print " [--logfile=<file> [--logclean=<1|0>]] \\\n";
print " [--all] [--basics] [--update] [--matrix] [--stats] \\\n";
+ print " [--noreport] [--perform] [--cpan] \\\n";
print " [--help|h] [--version|v] \n\n";
# 12345678901234567890123456789012345678901234567890123456789012345678901234567890
@@ -141,6 +145,9 @@ sub help {
print " [--matrix] # create matrix style pages\n";
print " [--stats] # create stats style pages\n";
print " [--leader] # create leaderboard pages\n";
+ print " [--noreports] # create no report pages\n";
+ print " [--perform] # create performance pages/files\n";
+ print " [--cpan] # create cpan pages/files\n";
print "\nOther Options:\n";
print " [--version] # program version\n";
View
10 lib/CPAN/Testers/WWW/Statistics.pm
@@ -4,7 +4,7 @@ use warnings;
use strict;
use vars qw($VERSION);
-$VERSION = '1.12';
+$VERSION = '1.13';
#----------------------------------------------------------------------------
@@ -263,6 +263,14 @@ sub make_stats {
$stats->build_stats();
}
+sub make_cpan {
+ my $self = shift;
+ $self->_check_files();
+
+ my $stats = CPAN::Testers::WWW::Statistics::Pages->new(parent => $self);
+ $stats->build_cpan();
+}
+
sub make_leaders {
my $self = shift;
$self->_check_files();
View
12 lib/CPAN/Testers/WWW/Statistics/Pages.pm
@@ -309,6 +309,18 @@ sub build_stats {
$self->{parent}->_log("stats finish");
}
+sub build_cpan {
+ my $self = shift;
+
+ $self->{parent}->_log("cpan stats start");
+
+ ## BUILD INDEPENDENT STATS
+ $self->_build_sizes();
+ $self->_report_cpan();
+
+ $self->{parent}->_log("cpan stats finish");
+}
+
sub build_performance {
my $self = shift;
Please sign in to comment.
Something went wrong with that request. Please try again.