develooper Front page | perl.perl5.porters | Postings from April 2006

Re: [perl #37407] /(??{ "(PAT)" })/ doesn't set $1.

Thread Previous | Thread Next
From:
Dominic Dunlop
Date:
April 3, 2006 00:57
Subject:
Re: [perl #37407] /(??{ "(PAT)" })/ doesn't set $1.
Message ID:
24950E7A-B538-4B40-8153-39D3AD0ADAFA@mac.com
On 2005–10–12, at 02:31, Dave Mitchell wrote:

> On Tue, Oct 11, 2005 at 05:09:36PM -0700, Yitzchak Scott-Thoennes  
> wrote:
>> Something queer here; this coredumps for me (both blead and maint):
>>
>>   my $dot = qr{ () }x;
>>   "" =~ /(??{ $dot })/x;
>
> Any re_eval that refers to an outer lexical may currently coredump.  
> This
> should get fixed by my shiny rewite of the re_eval code. (Sheduled for
> completion right after Duke Nukem Forever is released.)

I can't make that coredump on blead@27694. But then it doesn't  
coredump for me on 5.8.6 or 5.8.8 either. In all cases, the match  
succeeds, which is what I'd expect. Has your recent remodelling  
addressed this issue (or am I just the happy user of an architecture  
(Mac OS X) where perl doesn't happen to crash despite bad things  
happening under the hood)?

(Even if this issue has been addressed, abigail's original problem  
still exists:

if ("a" =~ /(??{ "(a)" })/) {
         printf "Match. \$& = '%s'. \$1 = '%s'\n" =>
                 map {defined $_ ? $_ : "UNDEF"} $&, $1;
     }

does not set $1.)
-- 
Dominic Dunlop


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