[open-ils-commits] r13620 - trunk/Open-ILS/src/perlmods/OpenILS/Application (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 17 12:36:17 EDT 2009
Author: miker
Date: 2009-07-17 12:36:15 -0400 (Fri, 17 Jul 2009)
New Revision: 13620
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
autodetect marcxml (or, rather, "not binary marc") at vandelay staging import
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2009-07-17 16:05:18 UTC (rev 13619)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2009-07-17 16:36:15 UTC (rev 13620)
@@ -232,7 +232,12 @@
$logger->info("vandelay spooling $fingerprint purpose=$purpose file=$filename");
- my $marctype = 'USMARC'; # ?
+ my $marctype = 'USMARC';
+
+ open F, $filename;
+ $marctype = 'XML' if (getc(F) =~ /^\D/o);
+ close F;
+
my $batch = new MARC::Batch ($marctype, $filename);
$batch->strict_off;
More information about the open-ils-commits
mailing list