develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #119499] $! returned with UTF-8 flag under UTF-8 localesonly under 5.19.2+

Thread Previous | Thread Next
Karl Williamson
September 16, 2013 16:04
Re: [perl #119499] $! returned with UTF-8 flag under UTF-8 localesonly under 5.19.2+
Message ID:
On 09/09/2013 07:06 PM, Karl Williamson wrote:
> On 09/02/2013 05:10 PM, Victor Efimov wrote:
>> 2013/9/1 Father Chrysostomos via RT <
>> <>>
>>     A new global variable is another option.
>> perhaps ${^DECODED_ERROR} ?
> I have come to believe that this is probably the best way forward.  That
> is, revert the $! change, and tell people who need it to use the new
> global variable which will decode as best it can on the given platform
> based on the locale in effect.

In looking at this, I thought of something else.  I do believe that the 
current behavior is correct for such a variable within the lexical scope 
of "use locale".  But outside such scope the behavior would be to decode 
fully, as best as practicable on the platform being run on.

Then it occurred to me would merely changing $! (and $^E) to behave this 
way address your issues?  It is a change in behavior from the way things 
have alway been, but outside "use locale", it would fully decode, which 
someone in the thread was the issue with the current fix.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About