Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 145 lines (96 sloc) 3.414 kb
#!/usr/bin/perl
use strict;
$|++;
my $VERSION = '0.51';
#----------------------------------------------------------------------------
=head1 NAME
cpanstats-writegraphs - script to create the CPAN Testers Statistics graphs.
=head1 SYNOPSIS
perl cpanstats-writegraphs
=head1 DESCRIPTION
Using previously formatted data, generate graphs using the Google Chart API.
=cut
# -------------------------------------
# Library Modules
use lib qw(./lib ../lib);
use Getopt::ArgvFile default=>1;
use Getopt::Long;
use CPAN::Testers::WWW::Statistics;
# -------------------------------------
# Variables
my (%options);
# -------------------------------------
# Program
init_options();
my $stats = CPAN::Testers::WWW::Statistics->new(
config => $options{config},
directory => $options{directory},
logfile => $options{logfile},
logclean => $options{logclean}
);
$stats->make_graphs();
# -------------------------------------
# Subroutines
=head1 FUNCTIONS
=over 4
=item init_options
Prepare command line options
=cut
sub init_options {
GetOptions( \%options,
'config=s',
'directory=s',
'logfile=s',
'logclean=i',
'help|h',
'version|v'
) or help(1);
help(1) if($options{help});
help(0) if($options{version});
}
sub help {
my $full = shift;
if($full) {
print "\n";
print "Usage:$0 --config=<file> \\\n";
print " [--logfile=<file> [--logclean=<1|0>]] \\\n";
print " [--directory=<dir>] \\\n";
print " [--help|h] [--version|v] \n\n";
# 12345678901234567890123456789012345678901234567890123456789012345678901234567890
print "This program builds the CPAN Testers Statistics website graphs.\n";
print "\nFunctional Options:\n";
print " [--config=<file>] # path to config file [required]\n";
print " [--directory=<dir>] # path to website directory\n";
print " [--logfile=<file>] # path to logfile\n";
print " [--logclean] # overwrite log if specified\n";
print "\nOther Options:\n";
print " [--version] # program version\n";
print " [--help] # this screen\n";
print "\nFor further information type 'perldoc $0'\n";
}
print "$0 v$VERSION\n";
exit(0);
}
__END__
=head1 BUGS, PATCHES & FIXES
There are no known bugs at the time of this release. However, if you spot a
bug or are experiencing difficulties, that is not explained within the POD
documentation, please send bug reports and patches to the RT Queue (see below).
Fixes are dependent upon their severity and my availability. Should a fix not
be forthcoming, please feel free to (politely) remind me.
RT Queue -
http://rt.cpan.org/Public/Dist/Display.html?Name=CPAN-Testers-WWW-Statistics
=head1 SEE ALSO
L<CPAN::Testers::Data::Generator>,
L<CPAN::Testers::WWW::Reports>,
F<http://www.cpantesters.org/>,
F<http://stats.cpantesters.org/>,
F<http://wiki.cpantesters.org/>
=head1 AUTHOR
Barbie, <barbie@cpan.org>
for Miss Barbell Productions <http://www.missbarbell.co.uk>.
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2005-2012 Barbie for Miss Barbell Productions.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
=cut
Jump to Line
Something went wrong with that request. Please try again.