r1764@llin: dpavlin | 2009-04-21 18:56:13 +0200
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 21 Apr 2009 21:03:52 +0000 (21:03 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 21 Apr 2009 21:03:52 +0000 (21:03 +0000)
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1128 07558da8-63fa-0310-ba24-9fe276d99e06

TODO
lib/WebPAC/Input.pm

diff --git a/TODO b/TODO
index e48c913..92b6f10 100644 (file)
--- a/TODO
+++ b/TODO
@@ -53,6 +53,7 @@
 + csv/excel output conf/normalize/csv_ff-peri.pl [2.34]
 + fix input/excel encoding problems
 + use UTF-8 as internal encoding
++ dump stats into var/stats.yml
 - marc_clone to copy records/fields/indicators from input marc
 - rewrite WebPAC::Input to be based on Module::Pluggable
 - check usage of config in normalize file (database, input name?)
index e400e7a..ff6ec61 100644 (file)
@@ -9,6 +9,7 @@ use WebPAC::Common;
 use base qw/WebPAC::Common/;
 use Data::Dump qw/dump/;
 use Encode qw/decode from_to/;
+use YAML;
 
 =head1 NAME
 
@@ -561,6 +562,10 @@ sub stats {
 
        $log->debug( sub { dump($s) } );
 
+       my $path = 'var/stats.yml';
+       YAML::DumpFile( $path, $s );
+       $log->info( 'created ', $path, ' with ', -s $path, ' bytes' );
+
        return $out;
 }