develooper Front page | perl.perl5.porters | Postings from March 2014

Re: Perl 5.20.0 Blockers, 2014-03-24

Thread Previous | Thread Next
From:
Karl Williamson
Date:
March 25, 2014 19:04
Subject:
Re: Perl 5.20.0 Blockers, 2014-03-24
Message ID:
5331D362.5020101@khwilliamson.com
On 03/24/2014 09:34 AM, Zefram wrote:
> Ricardo Signes wrote:
>> >6.  Gconvert() obeys LC_NUMERIC without "use locale"
>> >    https://rt.perl.org/Ticket/Display.html?id=121317
> Gconvert() should return to its former visible behaviour, and it should
> be deprecated.  There should be*two*  new macros to replace it, one of
> each behaviour, and they should be properly documented in perlapi(1).
> ppport.h can make the new macros available on older perls.
>

This sounds reasonable to me at first blush, but note there are some 
complications.

First, Gconvert didn't change.  What changed was that LC_NUMERIC now 
inherits from the environment.  I would revert that, adding 
documentation.  Thus other functions are affected.  One that I had 
missed in my earlier investigation is localeconv().  But also strtol() 
and strtoul(), although it's a very rare locale that would make a 
difference to these.  And my_sprintf(), my_snprintf(), and 
my_vsnprintf().  The behavior of all these would go back to what it was 
in 5.18.  That's not a bad thing, just something to be aware of.

Also Gconvert is a macro generated by Configure.  If we wish to raise a 
deprecated warning at its first use, we would have to turn it into an 
(hopefully inline) function.  I can't think of a way to do this without 
changing Configure.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About