[svk-commit] r2360 - in trunk: lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Mon Mar 26 13:14:21 EDT 2007


Author: clkao
Date: Mon Mar 26 13:14:20 2007
New Revision: 2360

Modified:
   trunk/Makefile.PL
   trunk/lib/SVK/Util.pm

Log:
Fix a win32 regression caused by r1763, which replaces Date::Format
with POSIX strftime, which turned out to be not portable enough.

Revert to the old behaviour if we are on win32.  Also add Date::Format
back as a dependency for win32.


Modified: trunk/Makefile.PL
==============================================================================
--- trunk/Makefile.PL	(original)
+++ trunk/Makefile.PL	Mon Mar 26 13:14:20 2007
@@ -91,6 +91,9 @@
     'Pod::Simple'              => '0',       # in core since 5.9.3
     'File::Spec'               => '3.19',    # in core since 5.9.3
 );
+requires(
+    'Date::Format'             => '',
+) if ($^O eq 'MSWin32');
 build_requires(
     'Test::More'               => '0.42',
 );

Modified: trunk/lib/SVK/Util.pm
==============================================================================
--- trunk/lib/SVK/Util.pm	(original)
+++ trunk/lib/SVK/Util.pm	Mon Mar 26 13:14:20 2007
@@ -953,6 +953,11 @@
 
 sub time2str {
     my ($format, $time) = @_;
+    if (IS_WIN32) {
+	require Date::Format;
+	goto \&Date::Format::time2str;
+    }
+
     require POSIX;
     return POSIX::strftime($format, localtime($time) );
 }


More information about the svk-commit mailing list