Skip to content

Commit

Permalink
Change deprecated POSIX::tmpnam to File::Temp versions
Browse files Browse the repository at this point in the history
  • Loading branch information
David Christensen committed Oct 24, 2017
1 parent 197edf2 commit 7277119
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion code/UI_Tag/substitute_file.coretag
Expand Up @@ -19,6 +19,7 @@ package File::Copy;
require File::Basename;
import File::Basename 'basename';
package Vend::Interpolate;
require File::Temp;
sub {
my ($file, $opt, $replace) = @_;
my $die = sub {
Expand Down Expand Up @@ -49,7 +50,7 @@ sub {
return $die->("missing begin or end marker");
}

my $bak = POSIX::tmpnam();
my $bak = File::Temp::tmpnam();
File::Copy::copy($file, $bak)
or return $die->(
"substitute_file - %s: unable to backup to %s",
Expand Down
3 changes: 2 additions & 1 deletion lib/Vend/External.pm
Expand Up @@ -41,6 +41,7 @@ use Vend::Session;
use Vend::Cart;
use Cwd;
require Data::Dumper;
require File::Temp;

BEGIN {
if($ENV{EXT_INTERCHANGE_DIR}) {
Expand All @@ -58,7 +59,7 @@ sub check_html {
logError("Can't check HTML: No global CheckHTML defined. Contact admin.", '');
}

my $file = POSIX::tmpnam();
my $file = File::Temp::tmpnam();
open(CHECK, "|$Global::CheckHTML > $file 2>&1") or die "Couldn't fork: $!\n";
print CHECK $$out;
close CHECK;
Expand Down
2 changes: 1 addition & 1 deletion scripts/crontab.PL
Expand Up @@ -45,7 +45,7 @@ BEGIN {

### END CONFIGURATION VARIABLES

use POSIX qw/tmpnam/;
use File::Temp qw/:POSIX/;
use Vend::Cron;

my $prospect = tmpnam();
Expand Down

0 comments on commit 7277119

Please sign in to comment.