LP#1246839: marc_stream_importer.pl no longer crashes with vs 0.23 of File::Temp
authorFredric T Parks <fparks@catalystitservices.com>
Wed, 6 Nov 2013 23:36:32 +0000 (15:36 -0800)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 13 Nov 2014 18:28:45 +0000 (10:28 -0800)
updated marc_stream_importer.pl to use the 0.23 API

Signed-off-by: Fredric T Parks <fparks@catalystitservices.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/support-scripts/marc_stream_importer.pl

index e0a2aa3..d418fb6 100755 (executable)
@@ -23,7 +23,7 @@ use MARC::File::USMARC;
 
 use Data::Dumper;
 use File::Basename qw/fileparse/;
-use File::Temp;
+use File::Temp qw/tempfile/;
 use Getopt::Long qw(:DEFAULT GetOptionsFromArray);
 use Pod::Usage;
 use Socket;
@@ -342,7 +342,7 @@ sub process_batch_data {
 
     my ($handle, $tempfile);
     if (!$isfile) {
-        ($handle, $tempfile) = File::Temp->tempfile("$0_XXXX", DIR => $tempdir) or die "Cannot write tempfile in $tempdir";
+        ($handle, $tempfile) = tempfile("$0_XXXX", DIR => $tempdir) or die "Cannot write tempfile in $tempdir";
         print $handle $data;
         close $handle;
     } else {