develooper Front page | perl.perl5.porters | Postings from October 2007

Re: [PATCH] New failing test for RT#45667 (m/[#]/x treated inconsistently)

Thread Previous | Thread Next
From:
demerphq
Date:
October 30, 2007 07:04
Subject:
Re: [PATCH] New failing test for RT#45667 (m/[#]/x treated inconsistently)
Message ID:
9b18b3110710300704l65d65670n9b15097730aa062e@mail.gmail.com
On 10/30/07, Rafael Garcia-Suarez <rgarciasuarez@gmail.com> wrote:
> On 28/10/2007, Chris Dolan <chris@chrisdolan.net> wrote:
> > Hello,
> >
> > RT#45667 points out that the Perl parser and the Regexp parser treat
> > m/[#]/x differently.  The former treats the # as a comment character
> > and the latter treats it as a literal.  I propose that we adopt the
> > Perl parser's behavior because 1) doing otherwise would require us to
> > add more regexp-specific knowledge to the Perl parser and 2) other
> > Regexp engines may not want to treat [#] the same as the current
> > default engine.
> >
> > The patch below adds a (currently failing) test to the regexp parser
> > to enforce this decision.  The patch is against rsync 5.10.0.32199
>
> it doesn't seem that op/regexp.t supports TODO tests. That would
> probably be a worthwhile addition...

Probably is. But im not entirely comfortable with the original patch.
Its not clear to me that we can change this behaviour anymore. At
least not in the regex engine. Its actually probably easier to change
this in the perl parser, which we long term intend to change anyway in
order to resolve the whole qr// as closure stuff as well as variable
bindings amongst other issues.

Probably a good idea if Dave Mitchell speaks up on this one as to my
knowledge he has the most developed idea of the future of this.

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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