From: Shawn Boyette Date: Thu, 11 Sep 2008 19:12:09 +0000 (+0000) Subject: track failed (evel fail) records X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=d0dac5a8fa5534fa3cda1abb0d05130ec9e1414a track failed (evel fail) records --- diff --git a/fingerprinter b/fingerprinter index 9c99ef1..feb6c19 100755 --- a/fingerprinter +++ b/fingerprinter @@ -10,6 +10,7 @@ use MARC::File::XML ( BinaryEncoding => 'utf-8' ); my $conf = {}; # configuration hashref my $count = 0; +my $failcount = 0; my $start = time; $| = 1; @@ -31,9 +32,9 @@ for my $file (@ARGV) { while ( eval { $record = $batch->next } ) { if ($@) - { print XF "MARC::Batch error $@"; next } - my $marc = undef; + { print XF "MARC::Batch error $@"; $failcount++; next } $count++; progress_ticker(); + my $marc = undef; unless ( defined $record ) { dump_exception($marc); next; } @@ -51,8 +52,12 @@ for my $file (@ARGV) { dump_fingerprints($marc); } } -print "\nProcessed $count records\n" unless $conf->{quiet}; +unless ($conf->{quiet}) { + print "\nSuccessfully processed:\t$count\n"; + print "Failed to process:\t$failcount\n"; + print "Total: ", ($count + $failcount), "\n"; +} =head2 populate_marc