11 |
use LWP; |
use LWP; |
12 |
use URI::Escape; |
use URI::Escape; |
13 |
use List::Util qw/first/; |
use List::Util qw/first/; |
14 |
|
use File::Path qw/mkpath/; |
15 |
use YAML; |
use YAML; |
16 |
|
|
17 |
=head1 NAME |
=head1 NAME |
295 |
my $self = shift; |
my $self = shift; |
296 |
my $log = $self->_get_logger(); |
my $log = $self->_get_logger(); |
297 |
|
|
298 |
my $path = 'var/estraier/' . $self->{database} . '.yaml'; |
my $path = 'var/estraier'; |
299 |
|
|
300 |
|
mkpath $path unless -e $path; |
301 |
|
|
302 |
|
$path .= '/' . $self->{database} . '.yaml'; |
303 |
YAML::DumpFile( $path, $self->{stats} ); |
YAML::DumpFile( $path, $self->{stats} ); |
304 |
$log->info("created $path ", -s $path, " bytes"); |
$log->info("created $path ", -s $path, " bytes"); |
305 |
$log->debug( dump( $self->{stats} ) ); |
$log->debug( dump( $self->{stats} ) ); |