This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: regpiece() Don't match 0 length more than once
authorKarl Williamson <khw@cpan.org>
Sun, 4 Oct 2020 22:46:51 +0000 (16:46 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 12 Oct 2020 15:45:47 +0000 (09:45 -0600)
commitbfed65f5f2d2093415809b85c95155b5c26e195c
treed274f0e7dca74b51a3f506306d8674184b1b8b8c
parent0ad29f588c0a2322ea7edc9f0a120050775466c6
regcomp.c: regpiece() Don't match 0 length more than once

There's no point in matching something more than once that doesn't
advance the parse, as long as there are no side effects beyond those
from the first match.  Those could only happen in code blocks, which
this code doesn't have.
regcomp.c