develooper Front page | perl.perl5.porters | Postings from July 2011

Re: Shouldn't \N{unknown name} be a syntax error?

Thread Previous | Thread Next
From:
Abigail
Date:
July 20, 2011 06:58
Subject:
Re: Shouldn't \N{unknown name} be a syntax error?
Message ID:
20110720135817.GC29844@almanda
On Tue, Jun 14, 2011 at 07:43:50PM -0600, Karl Williamson wrote:
> The current behavior of \N{} when it can't find the name is to raise a  
> warning and return the REPLACEMENT character.  This seems wrong to me,  
> as it is a compilation-time construct, and every other place I'm  
> familiar with bails out under such circumstances.
>
> Changing this would not have backwards compatibility issues, since the  
> likelihood of someone deliberately using this to insert a REPLACEMENT  
> character into a string seems vanishingly small to me.



Would it be possible to autoload 'use charnames ":full"' if \N{} can't
find a name, and charnames hasn't be loaded yet?


Abigail

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