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

Re: [perl #6011] /imsx not visible inside (??{})

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
June 7, 2012 00:49
Subject:
Re: [perl #6011] /imsx not visible inside (??{})
Message ID:
20120607074909.GB2787@iabyn.com
On Thu, Jun 07, 2012 at 08:15:49AM +0200, demerphq wrote:
> On 6 June 2012 23:58, Dave Mitchell <davem@iabyn.com> wrote:
> > On Wed, Jun 06, 2012 at 08:25:18PM +0200, Aristotle Pagaltzis wrote:
> >> * Ricardo Signes <perl.p5p@rjbs.manxome.org> [2012-06-06 00:30]:
> >> > I'm interested in what other people think, though!
> >>
> >> I think if a string is returned it should be compiled with the outer
> >> pattern’s flags, simply because of the relative difficulties of asking
> >> for the opposite behaviour.
> >
> > Ok I'm sold. I've fixed this in my re_eval branch.
> 
> Unrelated to this thread, but related to your work, is that I have in
> smoke-me a branch/patch to optimise NOTHING regops properly. I mention
> this because I noticed a lot of tests in pat_re_eval.t start with
> 
> /(?:|)..../
> 
> which my patch will optimize away entirely (as if they weren't in the
> pattern at all in this case). Do you know what purpose these serve in
> the tests?

No real idea. They were added by Bram to test the behaviour of $^N and $+ in
(?{}). So I guess he was trying to test all the permutations of
backtracking and paren index restoring.

-- 
"But Sidley Park is already a picture, and a most amiable picture too.
The slopes are green and gentle. The trees are companionably grouped at
intervals that show them to advantage. The rill is a serpentine ribbon
unwound from the lake peaceably contained by meadows on which the right
amount of sheep are tastefully arranged." -- Lady Croom, "Arcadia"

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