develooper Front page | perl.perl5.porters | Postings from June 2008

Re: [perl #56444] Perl 5.10 breaks \N{} in regex interpolated inside regex (with charnames)

Thread Previous
From:
andreas.koenig.7os6VVqR
Date:
June 29, 2008 11:33
Subject:
Re: [perl #56444] Perl 5.10 breaks \N{} in regex interpolated inside regex (with charnames)
Message ID:
87y74oozuu.fsf@k75.linux.bogus
>>>>> On Sun, 29 Jun 2008 00:38:27 -0700, "Chris Pirazzi" (via RT) <perlbug-followup@perl.org> said:

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

Thanks for the report. The patch that broke this script was 28868:

Change 28868 by merijn@merijn-lt09 on 2006/09/19 06:56:36

	Subject: Re: \N{...} in regular expression [PATCH]
	From: demerphq <demerphq@gmail.com>
	Date: Tue, 19 Sep 2006 01:37:19 +0200
	Message-ID: <9b18b3110609181637m796d6c16o1b2741edc5f09eb2@mail.gmail.com>

See also http://rt.cpan.org/Ticket/Display.html?id=34388

HTH,
-- 
andreas

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About