From: Mattia B. <mat...@li...> - 2007-05-13 18:59:42
|
On Fri, 11 May 2007 14:36:25 +0200 Johan Vromans <jvr...@sq...> wrote: Hi, > The result of Wx::wxVERSION seems to be produced with sprintf %f > format, and therefore obeys the locale settings. This is strange, because it is internally set as a float-only: mbarbon@cheshirecat:$ perl -MWx -MDevel::Peek -e 'Dump $Wx::wxVERSION' SV = NV(0x536d90) at 0x53fad0 REFCNT = 1 FLAGS = (NOK,pNOK) NV = 2.009 So wxPerl never sets it as a string (for those not familiar with Perl internals, the scalar on has a floating point part (NV) and only the NV-part-OK flags (NOK, pNOK) are set). > $ env LANG=en_GB perl -MWx -wle 'print $Wx::wxVERSION' > 2.006003 > $ env LANG=nl_NL perl -MWx -wle 'print $Wx::wxVERSION' > 2,006003 > This gives funny problems when modules use code like: > > if( Wx::wxVERSION() lt '2.006003') { ... } If you compare numbers as strings you are going to have more troubles. Regards, Mattia |