2010/1/27 demerphq <demerphq@gmail.com>:
> See then we would end up with bugs about how
>
> use charnames ':full';
> my $qr1= qr/\N{LATIN CAPITAL LETTER A}/;
> $^H{charnames} = sub{"f"};
> my $qr2= qr/\N{LATIN CAPITAL LETTER A}/;
> $^H{charnames} = sub{"foo"};
>
> my $x = 'foo';
> print "matched $1" if ($x=~/($qr1|$qr2|\N{LATIN CAPITAL LETTER A})/;
BTW, I should have said that this is hypothetical code. The point is
that two different charnames handlers could define different meanings
for any given charname. And then you need to somehow know which one it
was that the each qr// was defined under when embedding qr//. Etc etc.
It just seems to me to be a recipe for a mess. If we convert the
escape to something else that is not contextual we dont have to worry
about this at all. Anywhere. Which i think was the original plan.
cheers,
Yves
--
perl -Mre=debug -e "/just|another|perl|hacker/"
Thread Previous
|
Thread Next