develooper Front page | perl.perl5.porters | Postings from May 2010

Re: PATCH: [perl #58182] partial, "The Unicode Bug". Add unicode semantics for \s, \w

Thread Previous | Thread Next
From:
Ævar Arnfjörð Bjarmason
Date:
May 19, 2010 15:11
Subject:
Re: PATCH: [perl #58182] partial, "The Unicode Bug". Add unicode semantics for \s, \w
Message ID:
AANLkTil5DsX6_i8UtsRmzIM7rz2JHFyBHFud3ggsk6Jx@mail.gmail.com
On Wed, May 19, 2010 at 21:51, Paul LeoNerd Evans
<leonerd@leonerd.org.uk> wrote:
> Would it not make more sense to group them up under a single /u flag,
> something of the following:
>
>  m/Unicode on/u
>  m/Unicode off/u0
>  m/Unicode if locale says/ul
>  m/Unicode traditionally/ut

I like these too, but hitherto all the flags were 1-byte and could be
taken in any order, this would change that.

That might break some things, like stuff that uses re.pm and some of
the other regex APIs. Not a show stopper, but something to consider.

Would it only be at the end, or would /foo/ulpg work?

If we're going that route I think we might as well try to make the
Perl 6 flag groups work, i.e.:

    m/Some stuff/c:u0:g

That may be a no-go due to conflicting with some other syntax, though.

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