summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTim Jenness <tjenness@cpan.org>2000-08-20 01:01:25 -1000
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-20 21:16:47 +0000
commit93b42772edba45c8799fc03a21bca58c00671c19 (patch)
treed89543cee6405ae21dc1f8cbe9b1e48425264869 /utils
parente0f5a76d8ee0544e0359b61d52ce6f3c4d592aae (diff)
downloadperl-93b42772edba45c8799fc03a21bca58c00671c19.tar.gz
Use File::Spec->tmpdir().
Subject: Re: [ID 20000820.001] not OK - Perl 5.7.0 (uninstalled) Message-ID: <Pine.LNX.4.21.0008201057080.20544-100000@lapaki.jach.hawaii.edu> MIME-Version: 1.0 p4raw-id: //depot/perl@6728
Diffstat (limited to 'utils')
-rw-r--r--utils/perlbug.PL9
1 files changed, 3 insertions, 6 deletions
diff --git a/utils/perlbug.PL b/utils/perlbug.PL
index 76f6d93ef7..ffa31964ab 100644
--- a/utils/perlbug.PL
+++ b/utils/perlbug.PL
@@ -91,7 +91,7 @@ BEGIN {
$::HaveUtil = ($@ eq "");
};
-my $Version = "1.31";
+my $Version = "1.32";
# Changed in 1.06 to skip Mail::Send and Mail::Util if not available.
# Changed in 1.07 to see more sendmail execs, and added pipe output.
@@ -127,6 +127,7 @@ my $Version = "1.31";
# Changed in 1.29 Perlbug(tron): auto(-ok), short prompts RFOLEY 05-05-2000
# Changed in 1.30 Added warnings on failure to open files MSTEVENS 13-07-2000
# Changed in 1.31 Add checks on close().Fix my $var unless. TJENNESS 26-07-2000
+# Changed in 1.32 Use File::Spec->tmpdir TJENNESS 20-08-2000
# TODO: - Allow the user to re-name the file on mail failure, and
# make sure failure (transmission-wise) of Mail::Send is
@@ -905,12 +906,8 @@ EOF
}
sub filename {
- my $dir = $Is_VMS ? 'sys$scratch:'
- : ($Is_MSWin32 && $ENV{'TEMP'}) ? $ENV{'TEMP'}
- : $Is_MacOS ? $ENV{'TMPDIR'}
- : '/tmp';
+ my $dir = File::Spec->tmpdir();
$filename = "bugrep0$$";
-# $dir .= "\\" if $Is_MSWin32 and $dir !~ m|[\\/]$|;
$filename++ while -e File::Spec->catfile($dir, $filename);
$filename = File::Spec->catfile($dir, $filename);
}