Skip Menu |

This queue is for tickets about the Catalyst-Runtime CPAN distribution.

Report information
The Basics
Id: 57377
Status: resolved
Priority: 0/
Queue: Catalyst-Runtime

People
Owner: bobtfish [...] bobtfish.net
Requestors: kjetilk [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 5.80022
Fixed in: 5.90041



This IRC log explains it fairly well: [15:46] <kjetilkWork> on 5.8.0022, I'm seeing quite a few warnings with debug mode on saying [15:46] <kjetilkWork> Argument "1,448972" isn't numeric in numeric eq (==) at /usr/local/lib/site_perl/Catalyst.pm line 1766. [15:46] <kjetilkWork> appears trivial, but I'm still curious whether I'm doing something wrong? [15:53] <confuseAcat> kjetilkWork: are you using "use locale" somewhere in your code? [15:54] <kjetilkWork> confuseAcat: probably, yes [15:55] <kjetilkWork> so, sprintf with locale inserts a , instead of a . with %f ? [15:55] <confuseAcat> correct [15:55] <castaway> depending on the locale.. [15:55] <kjetilkWork> right [15:55] <kjetilkWork> ok, so actually a catalyst bug? [15:56] <kjetilkWork> (very minor, but still) [15:56] <castaway> what code is that thats going splat? [15:56] * castaway are lazy [15:56] <kjetilkWork> aren't we all, just a minute [15:57] <kjetilkWork> my $elapsed = sprintf '%f', $c->stats->elapsed; [15:57] <kjetilkWork> my $av = $elapsed == 0 ? '??' : sprintf '%.3f', 1 / $elapsed; [15:58] <confuseAcat> the code works, but it's issue a warning [15:59] <kjetilkWork> true [16:02] <castaway> kjetilkWork: ah, funky [16:02] * castaway wonders why == doesnt change on locale ;) [16:02] <kjetilkWork> :-) [16:06] * kjetilkWork thereby closes all his bugs for the next release of $internal_system ;-) [16:19] <kjetilkWork> confuseAcat: a cow-orker produced this example: [16:24] <shadowpaste> "kjetilkWork" at 217.168.150.38 pasted "bug demo" (8 lines) at http://paste.scsys.co.uk/43420
Re-paste of example before it gets lost: $tall = 0.45; print "$tall == 0?\n"; print $tall == 0 ? 'true' : 'false'; print "\n"; $tall = "0,45"; print "$tall == 0?\n"; print $tall == 0 ? 'true' : 'false'; print "\n";
Fixed in 5.90041