Changed never userd format configuration option for import_xml to
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 5 Feb 2004 10:55:58 +0000 (10:55 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 5 Feb 2004 10:55:58 +0000 (10:55 +0000)
marc_format to prevent clash with format for output. If you don't
specify it (as I never do) it will default to 'usmarc' which is probably
the right thing (tm).

git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@218 13eb9ef6-21d5-0310-b721-a9d68796d827

all2xml.pl

index c625e3f..976136e 100755 (executable)
@@ -789,14 +789,14 @@ print STDERR "using: $type...\n";
                my $marc_file = $cfg -> val($database, 'marc_file') || die "$database doesn't have 'marc_file' defined!";
 
                # optional argument is format
-               my $format = x($config->{format}) || 'usmarc';
+               my $format = x($config->{marc_format}) || 'usmarc';
 
                print STDERR "Reading MARC file '$marc_file'\n";
 
                my $marc = new MARC;
                my $nr = $marc->openmarc({
                                file=>$marc_file, format=>$format
-                       }) || die "Can't open MARC file '$marc_file'";
+                       }) || die "Can't open MARC file '$marc_file' with format '$format'";
 
                # read MARC file in memory
                $marc->nextmarc(-1);