#!/usr/bin/perl use strict; $|++; my $VERSION = '0.03'; #---------------------------------------------------------------------------- =head1 NAME cpanreps-update - script to update the CPAN Testers Reports website. =head1 SYNOPSIS perl cpanreps-update -c= -u= [-d=] =head1 DESCRIPTION Using an update file, will update the specific distribution and author pages for the website. =cut # ------------------------------------- # Library Modules use FindBin; use lib ("$FindBin::Bin/../lib", "../lib"); use CPAN::WWW::Testers; use Getopt::ArgvFile default=>1; use Getopt::Long; use File::Path; # ------------------------------------- # Variables my (%options); # ------------------------------------- # Program ##### INITIALISE ##### init_options(); ##### MAIN ##### my $t = CPAN::WWW::Testers->new(%options); $t->update($options{update}); # ------------------------------------- # Subroutines sub init_options { GetOptions( \%options, 'directory|d=s', 'config|c=s', 'update|u=s', 'help|h', 'version|v' ); help(1) if($options{help}); help(0) if($options{version}); } sub help { my ($full,$mess) = @_; print "\n$mess\n" if($mess); if($full) { print < L F, F =head1 AUTHOR Barbie =head1 COPYRIGHT AND LICENSE Copyright (C) 2008-2009 Barbie This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut