projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2b2f85d
)
fix usage of File::Temp->newdir, not in 0.18 File::Temp on perl 5.10.0, RT#5650
author
ivan
<ivan>
Tue, 3 Nov 2009 19:03:17 +0000
(19:03 +0000)
committer
ivan
<ivan>
Tue, 3 Nov 2009 19:03:17 +0000
(19:03 +0000)
FS/bin/freeside-paymentech-download
patch
|
blob
|
history
FS/bin/freeside-paymentech-upload
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-paymentech-download
b/FS/bin/freeside-paymentech-download
index
48dfe9b
..
214b7f8
100755
(executable)
--- a/
FS/bin/freeside-paymentech-download
+++ b/
FS/bin/freeside-paymentech-download
@@
-2,6
+2,8
@@
use strict;
use Getopt::Std;
use strict;
use Getopt::Std;
+use Date::Format qw(time2str);
+use File::Temp qw(tempdir); #0.19 for ->newdir() interface, not in 5.10.0
use Net::SFTP::Foreign;
use FS::UID qw(adminsuidsetup datasrc);
use FS::Record qw(qsearch qsearchs);
use Net::SFTP::Foreign;
use FS::UID qw(adminsuidsetup datasrc);
use FS::Record qw(qsearch qsearchs);
@@
-9,19
+11,14
@@
use FS::pay_batch;
use FS::cust_pay_batch;
use FS::Conf;
use FS::cust_pay_batch;
use FS::Conf;
-use Date::Format 'time2str';
-use File::Temp;
-
use vars qw( $opt_t $opt_v $opt_a );
getopts('vta:');
#$Net::SFTP::Foreign::debug = -1;
use vars qw( $opt_t $opt_v $opt_a );
getopts('vta:');
#$Net::SFTP::Foreign::debug = -1;
-sub usage {
'
+sub usage {
"
Usage:
Usage:
- paymentech-download [ -v ] [ -t ] [ -a archivedir ] user
-
-'
-}
+ paymentech-download [ -v ] [ -t ] [ -a archivedir ] user\n
+" }
my $user = shift or die &usage;
adminsuidsetup $user;
my $user = shift or die &usage;
adminsuidsetup $user;
@@
-33,7
+30,8
@@
if ( $opt_a ) {
unless -w $opt_a;
}
unless -w $opt_a;
}
-my $tmpdir = File::Temp->newdir();
+#my $tmpdir = File::Temp->newdir();
+my $tmpdir = tempdir( CLEANUP => 1 ); #DIR=>somewhere?
my $conf = new FS::Conf;
my @batchconf = $conf->config('batchconfig-paymentech');
my $conf = new FS::Conf;
my @batchconf = $conf->config('batchconfig-paymentech');
diff --git
a/FS/bin/freeside-paymentech-upload
b/FS/bin/freeside-paymentech-upload
index
6de29dd
..
e0ec4bd
100755
(executable)
--- a/
FS/bin/freeside-paymentech-upload
+++ b/
FS/bin/freeside-paymentech-upload
@@
-2,6
+2,8
@@
use strict;
use Getopt::Std;
use strict;
use Getopt::Std;
+use Date::Format qw(time2str);
+use File::Temp qw(tempdir); #0.19 for ->newdir() interface, not in 5.10.0
use Net::SFTP::Foreign;
use FS::UID qw(adminsuidsetup datasrc);
use FS::Record qw(qsearch qsearchs);
use Net::SFTP::Foreign;
use FS::UID qw(adminsuidsetup datasrc);
use FS::Record qw(qsearch qsearchs);
@@
-9,21
+11,16
@@
use FS::pay_batch;
use FS::cust_pay_batch;
use FS::Conf;
use FS::cust_pay_batch;
use FS::Conf;
-use Date::Format 'time2str';
-use File::Temp;
-
use vars qw( $opt_a $opt_t $opt_v );
getopts('avt');
#$Net::SFTP::Foreign::debug = -1;
use vars qw( $opt_a $opt_t $opt_v );
getopts('avt');
#$Net::SFTP::Foreign::debug = -1;
-sub usage {
'
+sub usage {
"
Usage:
paymentech-upload [ -v ] [ -t ] user batchnum
Usage:
paymentech-upload [ -v ] [ -t ] user batchnum
- paymentech-upload -a [ -v ] [ -t ] user
-
-'
-}
+ paymentech-upload -a [ -v ] [ -t ] user\n
+" }
my $user = shift or die &usage;
adminsuidsetup $user;
my $user = shift or die &usage;
adminsuidsetup $user;
@@
-47,7
+44,8
@@
my @batchconf = $conf->config('batchconfig-paymentech');
my $username = $batchconf[3] or die "no Paymentech batch username configured\n";
my $password = $batchconf[4] or die "no Paymentech batch password configured\n";
my $username = $batchconf[3] or die "no Paymentech batch username configured\n";
my $password = $batchconf[4] or die "no Paymentech batch password configured\n";
-my $tmpdir = File::Temp->newdir();
+#my $tmpdir = File::Temp->newdir();
+my $tmpdir = tempdir( CLEANUP => 1 ); #DIR=>somewhere?
my @filenames;
my @filenames;