Files
perl-Log-TraceMessages/Log-TraceMessages.tmpnam.patch
2017-10-10 05:24:05 +00:00

21 lines
580 B
Diff

--- a/test.pl
+++ b/test.pl
@@ -21,7 +21,7 @@ print "ok 1\n";
######################### End of black magic.
use strict;
-use POSIX qw(tmpnam);
+use File::Temp qw(tmpnam);
my $test_str = 'test < > &';
my $debug = 0;
my $out;
@@ -125,7 +125,7 @@ sub grab_output($) {
die 'usage: grab_stderr(string to eval)' if @_ != 1;
my $code = shift;
require POSIX;
- my $tmp_o = POSIX::tmpnam(); my $tmp_e = POSIX::tmpnam();
+ my $tmp_o = File::Temp->new(); my $tmp_e = File::Temp->new();
local *OLDOUT, *OLDERR;
print "running code: $code\n" if $debug;