if (length $exe_ext and $exe_name !~ /\Q$exe_ext\E$/) {
$exe_name .= $exe_ext;
}
- $self->{tmp_dir_obj} = File::Temp->newdir(CLEANUP => 1);
- $self->{tmp_dir} = $self->{tmp_dir_obj}->dirname;
- $self->{tmp_file} = File::Spec->catfile($self->{tmp_dir}, $exe_name);
+ $self->{tmp_dir_obj} = File::Temp->newdir(CLEANUP => 1);
+ $self->{tmp_dir} = $self->{tmp_dir_obj}->dirname;
+ $self->{tmp_file} = File::Spec->catfile($self->{tmp_dir}, $exe_name);
} else {
# Can't use the OO interface if we don't wan't the file to be opened by
# default, but then we have to deal with cleanup ourselves.
local $^W = 0;
(File::Temp::tempfile(%args))[1]
};
- $self->{tmp_file} = $tmp_file;
- my ($vol, $dir) = File::Spec->splitpath($self->{tmp_file});
- $self->{tmp_dir} = File::Spec->catpath($vol, $dir, '');
+ $self->{tmp_file} = $tmp_file;
+ my ($vol, $dir) = File::Spec->splitpath($self->{tmp_file});
+ $self->{tmp_dir} = File::Spec->catpath($vol, $dir, '');
}
my $code = _dummy_valgrind_code($version, $body);