develooper Front page | perl.perl5.porters | Postings from January 2017

Re: Perl still tries to compile regexes even if there are parseerrors

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
January 23, 2017 09:57
Subject:
Re: Perl still tries to compile regexes even if there are parseerrors
Message ID:
20170123095713.GZ4206@iabyn.com
On Sat, Jan 21, 2017 at 11:02:50PM -0700, Karl Williamson wrote:
> I was astonished to find that we try to compile patterns even if parse
> errors have been found.  This can lead to misleading error messages, and
> apparently judging from the test suite, segfaults in the past (and maybe
> currently.
> 
> It seems prudent to me to skip compiling patterns when parse errors have
> already been found.  Am I missing something?

I've always been very dubious about trying to continue parsing generally
after an error has been encountered. We've spent years trying to fix all
the bugs and SEGVs that this causes.

I've rarely found the extra error messages it produces useful: in both C
and perl I tend to just look at and fix the first error reported, then
recompile.  Long gone are the days where you would have to wait minutes to
recompile a source file (or wait for a compile report to be posted back to
you from the Data Centre).

I'd be interested to hear opposing opinions or counter-examples though.

-- 
Monto Blanco... scorchio!

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