develooper Front page | perl.perl5.porters | Postings from July 2018

Re: [perl #133366] *COMMIT bug?

Thread Previous | Thread Next
July 16, 2018 11:03
Re: [perl #133366] *COMMIT bug?
Message ID:
On Mon, 16 Jul 2018, Abigail wrote:

> Can't we make it so that the mere presence of a "(*COMMIT)" disables
> this optimization?

I thought about doing something similar for PCRE, where starting a 
pattern with (*COMMIT) (that is, force match at starting position) 
really needs to disable the "skip rapidly ahead to the first matching 
character before looking at the pattern" optimization. However, always
disabling this optimization when *COMMIT is present is overkill, because
if it appears later in the pattern there is no problem. Maybe there's a
similar consideration in Perl? [In the PCRE case, one can actually make 
this out to be a feature - "commit at first matching character" instead 
of "commit where you start looking" - and there is a switch to turn the 
optimization off.]

This is all annoyingly messy.


Philip Hazel

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About