2008/6/29 via RT Chris Pirazzi <perlbug-followup@perl.org>:
> Perl 5.10 (ActiveState ActivePerl Build 1003) breaks the following
> script, as compared with Perl 5.8.8 (ActiveState ActivePerl Build
> 822):
>
> use utf8;
> use strict;
> use English qw( -no_match_vars );
> use charnames ':full';
> my $r1 = qr/\N{THAI CHARACTER SARA I}/;
> my $s1 = "foo";
> $s1 =~ /$r1+/;
>
> The problem is that the last line errs with:
>
> Constant(\N{THAI CHARACTER SARA I}) unknown: (possibly a missing "use
> charnames...") in regex; marked by <-- HERE in m/(?-xism:\N{THAI
> CHARACTER SARA I} <-- HERE )+/ at t.pl line 7.
>
> Note that I did use 'charnames' and that the \N{} DOES work in the first regex.
> The err is in line 7, the last line, where the correctly compiled
> regex gets re-interpolated.
Interestingly, if we wrap the code from "my $r1" to the end in an
eval(""), then it compiles correctly. So that's some kind of
time-of-loading problem.
Thread Previous
|
Thread Next