Enable custom specified ID to be retained in preprocess subroutine
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 23 Feb 2008 00:32:45 +0000 (00:32 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 23 Feb 2008 00:32:45 +0000 (00:32 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8829 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/extras/import/marc2bre.pl

index 8360eae..9d8014d 100755 (executable)
@@ -166,7 +166,7 @@ while ( try { $rec = $batch->next } otherwise { $rec = -1 } ) {
        }
 
        my $tcn;
-       ($rec, $tcn) = preprocess($rec);
+       ($rec, $tcn) = preprocess($rec, $id);
 
     $tcn->add_subfields(c => $id);
 
@@ -212,8 +212,9 @@ while ( try { $rec = $batch->next } otherwise { $rec = -1 } ) {
 
 sub preprocess {
        my $rec = shift;
+       my $id = shift;
 
-       my ($id, $source, $value) = ('','','');
+       my ($source, $value) = ('','','');
 
        if (!$id) {
                my $f = $rec->field('001');