LP#1246839: update marc_stream_importer.pl to support 0.23 of File::Temp user/gmcharlt/lp1246839_support_file_temp_v0_23
authorFredric T Parks <fparks@catalystitservices.com>
Wed, 6 Nov 2013 23:36:32 +0000 (15:36 -0800)
committerGalen Charlton <gmcharlt@gmail.com>
Wed, 19 Mar 2014 15:36:17 +0000 (11:36 -0400)
updated marc_stream_importer.pl to use the 0.23 API

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

index d288504..afca727 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;
@@ -333,7 +333,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(TEMPLATE => "$0_XXXX", DIR => $tempdir) or die "Cannot write tempfile in $tempdir";
         print $handle $data;
         close $handle;
     } else {