From: Shawn Boyette Date: Thu, 11 Sep 2008 19:20:32 +0000 (+0000) Subject: removing eval trap altogether X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=9e0057fd01bcc1dacd7eb16b22be8f68c85edd00 removing eval trap altogether --- diff --git a/fingerprinter b/fingerprinter index feb6c19..ecc14aa 100755 --- a/fingerprinter +++ b/fingerprinter @@ -10,7 +10,6 @@ use MARC::File::XML ( BinaryEncoding => 'utf-8' ); my $conf = {}; # configuration hashref my $count = 0; -my $failcount = 0; my $start = time; $| = 1; @@ -30,9 +29,7 @@ for my $file (@ARGV) { $batch->strict_off(); $batch->warnings_off(); - while ( eval { $record = $batch->next } ) { - if ($@) - { print XF "MARC::Batch error $@"; $failcount++; next } + while ( $record = $batch->next ) { $count++; progress_ticker(); my $marc = undef; unless ( defined $record ) @@ -53,12 +50,7 @@ for my $file (@ARGV) { } } -unless ($conf->{quiet}) { - print "\nSuccessfully processed:\t$count\n"; - print "Failed to process:\t$failcount\n"; - print "Total: ", ($count + $failcount), "\n"; -} - +print "\nSuccessfully processed:\t$count\n" unless $conf->{quiet}; =head2 populate_marc