Changeset 19478 for lang/perl/App-Hachero
- Timestamp:
- 09/18/08 14:09:49 (5 years ago)
- Location:
- lang/perl/App-Hachero/trunk/lib/App
- Files:
-
- 3 modified
-
Hachero.pm (modified) (1 diff)
-
Hachero/Plugin/Analyze/AccessCount.pm (modified) (1 diff)
-
Hachero/Plugin/Input/File.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/App-Hachero/trunk/lib/App/Hachero.pm
r19262 r19478 49 49 sub run_hook_and_check { 50 50 my $self = shift; 51 $self->run_hook(@_); 52 return $self->currentline; 51 my $hook = shift; 52 $self->run_hook($hook); 53 unless ($self->currentline) { 54 $self->log(debug => "run_hook_and_check: $hook failed and skip this line."); 55 return 0; 56 } 57 1; 53 58 } 54 59 -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Analyze/AccessCount.pm
r19472 r19478 10 10 my $req = $context->currentinfo->{request} or return; 11 11 my $truncate = $self->config->{config}->{truncate_to} || 'minute'; 12 my $time = DateTime::Format::MySQL->format_datetime( 13 $req->{datetime}->clone->truncate(to => $truncate) 14 ); 15 my $key = $req->{datetime}->epoch; 12 my $time = $req->{datetime}->clone->truncate(to => $truncate); 13 my $key = $time->epoch; 16 14 $context->result->{'AccessCount'}->{$key} = { 17 datetime => $time,15 datetime => DateTime::Format::MySQL->format_datetime($time), 18 16 count => ($context->result->{'AccessCount'}->{$key}->{count} || 0) + 1, 19 17 } -
lang/perl/App-Hachero/trunk/lib/App/Hachero/Plugin/Input/File.pm
r19473 r19478 41 41 print STDERR "\rreading file: $self->{readsize}/$self->{filesize}"; 42 42 } 43 unless ($line) { 43 if ($line) { 44 # $context->log(debug => 'the line: '. $line); 45 } else { 44 46 if ($context->conf->{global}->{log}->{level} eq 'debug') { 45 47 print STDERR "\n";
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)