perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject utime on Win32
Date Sat, 21 May 2005 19:55:05 GMT
In t/lib/TestAPR/finfo.pm, for Win32,
   utime undef, undef, $file;
is used. However, with perl-5.8.0, this leads to a warning
about an uninitialized value being used, causing the finfo
tests to fail. This apparently is a bug in 5.8.0, as it's OK
with 5.8.6. Would the following patch be OK?
================================================
Index: t/lib/TestAPRlib/finfo.pm
===================================================================
--- t/lib/TestAPRlib/finfo.pm	(revision 169037)
+++ t/lib/TestAPRlib/finfo.pm	(working copy)
@@ -35,7 +35,8 @@
     # Time season as the current time to workaround a bug in Win32's stat()
     # which APR::Finfo allows for, otherwise the two disagree.
     if (WIN32) {
-        utime undef, undef, $file;
+        my $now = time;
+        utime $now, $now, $file;
     }

     my $pool = APR::Pool->new();
=====================================================
perldoc -f utime says the two are equivalent, and I've
verified that the finfo tests pass on 5.8.0 with it.

-- 
best regards,
randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message