Skip Menu |
 

This queue is for tickets about the Regexp-Grammars CPAN distribution.

Report information
The Basics
Id: 48860
Status: open
Priority: 0/
Queue: Regexp-Grammars

People
Owner: Nobody in particular
Requestors: b2gills [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.001005
Fixed in: (no value)



Subject: Simple anonymous array in code block
(?{ $MATCH = [] }) Doesn't work correctly. There is a work-around (?{ $MATCH = [qw''] })
Subject: test
Download test
application/octet-stream 427b

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #48860] Simple anonymous array in code block
Date: Thu, 20 Aug 2009 07:45:41 +0200
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Download (untitled) / with headers
text/plain 518b
Show quoted text
> (?{ $MATCH = [] }) > > Doesn't work correctly.
I can't replicate that. The following example works as expected under 5.10.0 on MacOS. -----cut----------cut----------cut----------cut----------cut----- use Regexp::Grammars; use Data::Dumper 'Dumper'; my $grammar = qr{ <test> <token: test> abc (?{ $MATCH = [] }) }xms; if ('abc' =~ $grammar) { say Dumper \%/; } else { say 'failed'; } -----cut----------cut----------cut----------cut----------cut----- Does it not work for you? Damian
From: Brad Gilbert <b2gills [...] gmail.com>
Download (untitled) / with headers
text/plain 426b
#! /usr/bin/env perl use strict; use warnings; use 5.010; use YAML; use Regexp::Grammars; my $str = '[[,action1,,],[action2],[],[,],[,[],]]'; my $parser = qr{ <match=Array> <token: Text> [^,\[\]]* <token: Element> (?: <.Text> | <MATCH=Array> ) <token: Array> \[ (?: (?{ $MATCH = []; }) | <[MATCH=Element]> ** (,) ) \] }x; if( $str =~ $parser ){ say Dump \%/; }else{ die $@ if $@; }
Subject: Re: [rt.cpan.org #48860] Simple anonymous array in code block
Date: Fri, 21 Aug 2009 07:53:48 +0200
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Thanks for the example. Definitely a bug. I'm currently tracking the problem down. Damian
Subject: Re: [rt.cpan.org #48860] Simple anonymous array in code block
Date: Fri, 21 Aug 2009 23:01:08 +0200
To: bug-Regexp-Grammars [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Download (untitled) / with headers
text/plain 114b
Bug fixed for the next release. Thanks for the excellent test case that made debugging it so much easier! Damian


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.