3 |
use warnings; |
use warnings; |
4 |
use strict; |
use strict; |
5 |
|
|
6 |
use blib; |
use lib 'lib'; |
7 |
|
|
8 |
use WebPAC::Common; |
use WebPAC::Common; |
9 |
use base qw/WebPAC::Common/; |
use base qw/WebPAC::Common/; |
10 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
11 |
use Encode qw/decode from_to/; |
use Encode qw/decode from_to/; |
12 |
|
use YAML; |
13 |
|
|
14 |
=head1 NAME |
=head1 NAME |
15 |
|
|
316 |
warn "*** $d\n" if ($debug); |
warn "*** $d\n" if ($debug); |
317 |
|
|
318 |
} |
} |
319 |
$log->error("error applying regex: $r") if ($@); |
$log->error("error applying regex: ",dump($r), $@) if $@; |
320 |
} |
} |
321 |
} |
} |
322 |
|
|
562 |
|
|
563 |
$log->debug( sub { dump($s) } ); |
$log->debug( sub { dump($s) } ); |
564 |
|
|
565 |
|
my $path = 'var/stats.yml'; |
566 |
|
YAML::DumpFile( $path, $s ); |
567 |
|
$log->info( 'created ', $path, ' with ', -s $path, ' bytes' ); |
568 |
|
|
569 |
return $out; |
return $out; |
570 |
} |
} |
571 |
|
|
724 |
line => $., |
line => $., |
725 |
}; |
}; |
726 |
$log->debug("regex: $regex"); |
$log->debug("regex: $regex"); |
727 |
|
} else { |
728 |
|
die "can't parse: $_"; |
729 |
} |
} |
730 |
} |
} |
731 |
|
|