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

Re: Empty regex

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
June 19, 2008 03:10
Subject:
Re: Empty regex
Message ID:
20080619101009.GL99534@plum.flirble.org
On Wed, Jun 18, 2008 at 10:54:28PM -0700, Yitzchak Scott-Thoennes wrote:

> WRT split, this is *not* an exception in split, nor is it actually a regex
> feature.  Rather, it is a feature of the match and substitute operations,
> but not split or qr.  And there's a bug here, triggered by an
> optimization:
> 
> $ perl -w
> use Test::More 'no_plan';
> my $x = qr//;
> ok("foo" =~ /foo/ && "bar" =~ /$x$x/);
> ok("foo" =~ /foo/ && "bar" =~ /$x/);
> ok 1
> not ok 2

Is that bug in RT? Does it have a TODO test yet?

Nicholas Clark

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