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

Re: Empty regex

Thread Previous | Thread Next
From:
Yitzchak Scott-Thoennes
Date:
June 19, 2008 10:28
Subject:
Re: Empty regex
Message ID:
61146.71.212.103.247.1213896484.squirrel@webmail.efn.org
On Thu, June 19, 2008 3:10 am, Nicholas Clark wrote:
> 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?

I don't know to both.  I expected there to be some dissention about
which case was the bug.  I only know what I think, which is reflected
in the above.


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