Skip to content

Commit

Permalink
added missing method
Browse files Browse the repository at this point in the history
  • Loading branch information
barbie committed Jul 2, 2011
1 parent bad672e commit ef5bf72
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Revision history for CPAN-Testers-WWW-Statistics
- changed storage method to mainstore and added leadstore for JSON data
storage files.
- updated tests.
- added missing method for the missing-in-action file path.

0.88 31/10/2010
- added further timestamp test pattern.
Expand Down
4 changes: 3 additions & 1 deletion lib/CPAN/Testers/WWW/Statistics.pm
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ sub new {
$self->templates(_defined_or( $hash{templates}, $cfg->val('MASTER','templates') ));
$self->database( _defined_or( $hash{database}, $cfg->val('MASTER','database' ) ));
$self->address( _defined_or( $hash{address}, $cfg->val('MASTER','address' ) ));
$self->missing( _defined_or( $hash{missing}, $cfg->val('MASTER','missing' ) ));
$self->logfile( _defined_or( $hash{logfile}, $cfg->val('MASTER','logfile' ) ));
$self->logclean( _defined_or( $hash{logclean}, $cfg->val('MASTER','logclean' ), 0 ));
$self->directory(_defined_or( $hash{directory}, $cfg->val('MASTER','directory') ));
Expand All @@ -129,6 +130,7 @@ sub new {
$self->_log("templates=".($self->templates || ''));
$self->_log("database =".($self->database || ''));
$self->_log("address =".($self->address || ''));
$self->_log("missing =".($self->missing || ''));
$self->_log("logfile =".($self->logfile || ''));
$self->_log("logclean =".($self->logclean || ''));
$self->_log("directory=".($self->directory || ''));
Expand Down Expand Up @@ -190,7 +192,7 @@ Returns the print form of a recorded OS name.

__PACKAGE__->mk_accessors(
qw( directory mainstore leadstore templates database address builder
logfile logclean copyright tocopy osnames));
missing logfile logclean copyright tocopy osnames));

sub make_pages {
my $self = shift;
Expand Down
4 changes: 3 additions & 1 deletion lib/CPAN/Testers/WWW/Statistics/Pages.pm
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,9 @@ sub _missing_in_action {

$self->{parent}->_log("building missing in action page");

my $fh = IO::File->new('data/missing-in-action.txt') or return;
my $missing = $self->{parent}->missing();
return unless(-f $missing);
my $fh = IO::File->new($missing) or return;
while(<$fh>) {
chomp;
my ($pauseid,$timestamp,$reason) = /^([a-z]+)[ \t]+([^+]+\+0[01]00) (.*)/i;
Expand Down

0 comments on commit ef5bf72

Please sign in to comment.