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

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

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
July 15, 2013 06:54
Subject:
[perl #117355] [lu]cfirst don't respect 'use bytes'
Message ID:
rt-3.6.HEAD-17128-1373871275-712.117355-15-0@perl.org
On Tue Mar 26 03:50:37 2013, davem wrote:
> On Tue, Mar 26, 2013 at 02:50:34AM +0100, Aristotle Pagaltzis wrote:
> > * Brian Fraser <perlbug-followup@perl.org> [2013-03-26 01:50]:
> > > $_ = "\x{30cb}";
> > > use Devel::Peek;
> > > use bytes;
> > > Dump $_ for uc, lc, CORE::fc, ucfirst, lcfirst;
> > >
> > > ucfirst & lcfirst return a UTF-8 flagged scalar, while the first three
> > > return bytes.
> > 
> > Is it worth fixing something to follow a semantic that itself is broken
> > as designed?
> > 
> > I’m not sure if we had an explicit consensus about bytes.pm being highly
> > discouraged, the way we had about encoding.pm deserving deprecation, but
> > I would be happy if we could move it in that direction; and the farther,
> > the happier.
> 
> 
> From the top of the pod in bytes.pm, added for 5.12.0:
> 
> =head1 NOTICE
> 
> This pragma reflects early attempts to incorporate Unicode into perl and
> has since been superseded. It breaks encapsulation (i.e. it exposes the
> innards of how the perl executable currently happens to store a string),
> and use of this module for anything other than debugging purposes is
> strongly discouraged. If you feel that the functions here within might be
> useful for your application, this possibly indicates a mismatch between
> your mental model of Perl Unicode and the current reality. In that case,
> you may wish to read some of the perl Unicode documentation:
> L<perluniintro>, L<perlunitut>, L<perlunifaq> and L<perlunicode>.

What can we do to upgrade this to a deprecation?

-- 

Father Chrysostomos


---
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