From d0dac5a8fa5534fa3cda1abb0d05130ec9e1414a Mon Sep 17 00:00:00 2001 From: Shawn Boyette Date: Thu, 11 Sep 2008 19:12:09 +0000 Subject: [PATCH] track failed (evel fail) records --- fingerprinter | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) 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 -- 1.7.2.5