[Catalyst] Catalyst::Helper passes %T to POSIX::strftime - causes
infinite loop under Win32
bits
bits_catalyst at itools.com
Tue Jul 17 23:09:55 GMT 2007
I didn't mention it, but I'm running Windows Vista 32-bit. UAC is enabled
and this occurs whether running with elevated privileges or not. I should
note that I previously had Catalyst running on a Vista laptop with
ActiveState 820 and did not have this problem.
Not sure if the build environment can affect POSIX::strftime - but in case
it could:
The first build tools in the path is Microsoft Visual C++ 2005 Express
Edition. Also installed are (Microsoft Windows Software Development Kit for
Windows Vista and .NET Framework 3.0 Runtime Components) and (Microsoft
Windows Server 2003 R2 Platform SDK)
Listed further along the path MinGW can be found.
Given that perl -MPOSIX -e "print POSIX::strftime('%T', localtime time);"
produces the infinite loop, I suspect it has little to do with Catalyst,
other than making the problematic call.
I'm happy to provide additional details, but not sure what else could be
helpful. Ask away if you like.
bits
-----Original Message-----
From: matthewt at scsys.co.uk [mailto:matthewt at scsys.co.uk] On Behalf Of Matt S
Trout
Sent: Tuesday, July 17, 2007 5:21 PM
To: bits_catalyst at itools.com; The elegant MVC web framework
Subject: Re: [Catalyst] Catalyst::Helper passes %T to POSIX::strftime -
causes infinite loop under Win32
On Tue, Jul 17, 2007 at 12:32:48PM -0400, bits wrote:
> Catalyst::Helper::_mk_changes calls POSIX::strftime on line 390:
> my $time = strftime('%Y-%m-%d %T', localtime time);
>
> the %T parameter causes my Activestate Perl 5.8.8 820 to infinite loop.
Odd, it doesn't cause any AS perl I've seen do that.
> The perldoc for POSIX states in the strftime notes:
> "If you want your code to be portable, your format (fmt ) argument should
> use only the conversion specifiers defined by the ANSI C standard (C89, to
> play safe). These are aAbBcdHIjmMpSUwWxXyYZ% ."
>
> %T is not in the list. On all the systems I have at my disposal, %H:%M:%S
> produces equivalent output and uses only the conversion specifiers they
> recommend.
>
>
> For the sake of saving the next soul who wants to use Catalyst under
Win32,
> which apparently doesn't like %T, suggest changing to:
>
> my $time = strftime('%Y-%m-%d %H:%M:%S', localtime time);
While I see no reason at all not to make this change, could you elaborate
on your environment a bit?
This can't be "all win32" since I know we've got happy users on win32 and
various perls (although VanillaPerl is getting more and more popular due to
various bits of ActiveState brain damage), so I'm curious now :)
--
Matt S Trout Need help with your Catalyst or DBIx::Class
project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/
More information about the Catalyst
mailing list