improve marc_parses() test
[migration-tools.git] / fingerprinter
index a42efc1..a3af67a 100755 (executable)
@@ -34,7 +34,7 @@ $| = 1;
 initialize($conf);
 
 open OF, '>', $conf->{output} or die "$0: cannot open output file $conf->{output}: $!\n";
-open XF, '>', $conf->{exception} or die "$0: cannot open exception file $conf->{output}: $!\n";
+open XF, '>', $conf->{exception} or die "$0: cannot open exception file $conf->{exception}: $!\n";
 
 for my $file (@ARGV) {
     print XF "Processing $file\n";
@@ -373,11 +373,11 @@ sub dump_fingerprints {
         }
     }
 
-    if ($conf->{fingerprints}{edition} and $marc->{edition}) {
+    if ($conf->{fingerprints}{edition} and $marc->{edition} and $marc->{author}) {
         print OF join("\t", $marc->{score}, $marc->{id}, "edition",
                       $marc->{item_form}, $marc->{date1},
                       $marc->{record_type}, $marc->{bib_lvl},
-                      $marc->{title}, $marc->{edition}), "\n";
+                      $marc->{title}, $marc->{author}, $marc->{edition}), "\n";
     }
 
     if ($conf->{fingerprints}{issn} and $marc->{issn}) {