Grokbase
Topics Posts Groups | in
x
[ help ]

Re: [RFC] Regular expression character classes and unicode.

View PostFlat  Thread  Threaded | < Prev - Next >
Rafael Garcia-Suarez Re: [RFC] Regular expression character classes and unicode.
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
2008/11/11 karl williamson <public@khwilliamson.com>:
> But there are problems with pragmas. As I've discovered, the charnames
> pragma goes away in an eval. That this should happen was not obvious to me,
> and I suspect not so to the average Perl progammer. It doesn't DWIM, and
> I'm not convinced it is the right thing to do. It means that complementing
> the default from release to release can cause programs to have to add pragma
> calls to their evals.

To me it's a bug. Actually that might be caused by charnames storing
an arrayref in %^H. But I don't reproduce it with 5.10 (the script
below works). Do you have some test code ?

use strict;
use warnings;
use 5.01;
use charnames 'greek';
say "\N{sigma} is Greek sigma";
eval { say "\N{sigma} is Greek sigma"; };
eval ' say "\N{sigma} is Greek sigma"; ';

Thread : [RFC] Regular expression character classes and unicode.
1)
demerphq As has been discussed recently and over the years we have some issues with the regular expression...
2)
demerphq 2008/11/9 demerphq <demerphq@gmail.com>: In fact I only mean the character class issues here. What...
3)
Ben Morrow Quoth demerphq@gmail.com (demerphq): <snip> We could instead create Unicode properties with...
4)
Abigail I agree. There 13 unclaimed escape shortcuts unused: \F, \i, \I, \j, \J, \m, \M, \o, \O, \q, \T, \y...
5)
demerphq 2008/11/10 Abigail <abigail@abigail.be>: Well, we only have "room" for one more pair, and I figured...
6)
karl williamson I'm not sure I understand the proposal completely. As I understand it, the problem really stems...
7)
demerphq 2008/11/11 karl williamson <public@khwilliamson.com>: thats what my proposal amounts to, and what...
8)
karl williamson I agree. And I was wrong to imply that \p{...} derives from [:...:]. Some of them probably do, like...
9)
karl williamson One thing to consider, and I don't claim to know the answer, is what to do about the newer single...
10)
Ben Morrow Quoth public@khwilliamson.com (karl williamson): I would say yes, definitely. That way there's a...
11)
Abigail \R is not a character class, as it can match the two character string "\r\n". But there are other...
12)
Rafael Garcia-Suarez 2008/11/11 karl williamson <public@khwilliamson.com>: To me it's a bug. Actually that might be...
13)
demerphq 2008/11/27 karl williamson <public@khwilliamson.com>: It is a consequence of the charnames pragma...
14)
karl williamson It appears that there is a hole in the current set of bits defined in perl.h, at 0x00000800, which...
15)
David Nicol My guess is that it wasn't done that way originally due to simple tuit constraints.
16)
Abigail But there's a problem. Currently, all Unicode properties are case insensitive. /\pL/ and /\pl/ for...
spacer
View PostFlat  Thread  Threaded | < Prev - Next >