Revision history for Perl extension Time::HiRes.
+1.56
+ - Give a clearer message if the tests timeout (perl change #22253)
+ - Don't use /tmp or its moral equivalents (perl bug #15036,
+ perl change #22258)
+
1.55
- Windows: ming32 patch from Mike Pomraning (use Perl's Const64()
instead of VC-specific i64 suffix)
# without changing it, and then I'd always forget to change it before a
# release. Sorry, Edward :)
-sub TMPDIR {
- my $TMPDIR =
- (grep(defined $_ && -d $_ && -w _,
- ((defined $ENV{'TMPDIR'} ? $ENV{'TMPDIR'} : undef),
- qw(/var/tmp /usr/tmp /tmp c:/temp))))[0];
- $TMPDIR || die "Cannot find writable temporary directory.\n";
-}
-
sub try_compile_and_link {
my ($c, %args) = @_;
my ($ok) = 0;
- my ($tmp) = (($^O eq 'VMS') ? "sys\$scratch:tmp$$" : TMPDIR() . '/' . "tmp$$");
+ my ($tmp) = "tmp$$";
local(*TMPC);
my $obj_ext = $Config{obj_ext} || ".o";
'SUFFIX' => 'gz',
},
clean => { FILES => "xdefine" },
- realclean => {FILES=> 'const-c.inc const-xs.inc'},
+ realclean => { FILES=> 'const-c.inc const-xs.inc' },
);
if ($ENV{PERL_CORE}) {
print <<EOM;
NOTE: if you get an error like this (the line number may vary):
Makefile:91: *** missing separator
-then set the environment variable LC_ALL to "C" and retry.
+then set the environment variable LC_ALL to "C" and retry
+from scratch (re-run perl "Makefile.PL").
EOM
}
if ($pid == 0) { # We are the kid, set up the timer.
print "# Timer process $$\n";
sleep($waitfor);
- warn "$0: Time's up!\n";
+ warn "\n$0: overall time allowed for tests (${waitfor}s) exceeded\n";
print "# Terminating the testing process\n";
kill('TERM', getppid());
print "# Timer process exiting\n";