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

[perl #117355] [lu]cfirst don't respect 'use bytes'

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
July 5, 2013 01:40
Subject:
[perl #117355] [lu]cfirst don't respect 'use bytes'
Message ID:
rt-3.6.HEAD-2552-1372988410-75.117355-15-0@perl.org
On Sat May 04 20:03:46 2013, public@khwilliamson.com wrote:
> Attached is a patch that fixes the original report.  The code it
> changes
> is a small portion of this commit:
> 
> commit d54190f6ca0aac8b08bb59370c53932771933c40
>   Author: Nicholas Clark <nick@ccl4.org>
>   Date:   Sat Apr 29 15:55:51 2006 +0000
> 
>       lcfirst/ucfirst plus an 8 bit locale could mangle UTF-8 values
>       returned by overloaded stringification.
> 
> I was the one who added the comments much later.  I was trying to make
> sense of that code, and I think now that I didn't fully grok things.
> 
> I'm tempted to apply the patch unless someone can say why it would
> break
> things, which would mean that the other functions are broken as well.
> People do use 'use bytes'; we aren't going to remove it any time soon.

As much as I despise use bytes, I think this patch could go in, but it
would need tests.

If no-one else provides tests I'll write some over the next few days.

Or not, if people object to the change, in which case they should
propose an alternative.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=117355

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