develooper Front page | perl.perl5.porters | Postings from May 2013

[perl #117327] Sequence (?#...) not recognized in regex

Thread Previous
Father Chrysostomos via RT
May 5, 2013 22:18
[perl #117327] Sequence (?#...) not recognized in regex
Message ID:
On Wed May 01 01:05:51 2013, demerphq wrote:
> On 1 May 2013 02:27, Father Chrysostomos via RT
> <> wrote:
> > On Tue Apr 30 16:09:35 2013, rjbs wrote:
> >> (c) the "all things in moderation" option
> >>
> >> We leave things exactly as they are in blead, post-50485807, but alter
> >> the emitted error to say
> >> "you can't put space where you put it."  This puts any likely
> >> breakage's starting point back in
> >> January (before the user-visible change freeze), and we move to option
> >> (a) in 5.19.0.  There are
> >> two down sides, here:  first, we're adding a new syntax error where
> >> there wasn't one without
> >> warning; secondly, we're introducing inconsistency.  The inconsistency
> >> doesn't bother me *as
> >> long as we fix it ASAP*.  This is like "we fixed a bunch of parts of a
> >> bug, and will continue to fix
> >> its other parts."  This kind of half-fix is something I am expressly
> >> okay with, as we're doing
> >> timeboxed releases.
> >
> > This is the only option I really don’t like.  I have a module that
> > converts between flavours of regular expressions, and tests to make sure
> > that Perl-specific extensions are passed through unchanged.  (These
> > tests are apparently more exhaustive than Perl’s own test suite. :-)
> Maybe you should contribute some test files to core.

I included the smiley because my tests are not that exhaustive, just two
tests for each (?...) construct to make sure my module doesn’t screw
them up.

> But do consider that you might be testing for behavior that I would
> consider to be a bug - IOW, behavior I would not write a test for
> because I don't consider it to be correct in the first place. For
> instance I dont consider it a bug that we have no tests to make sure
> /((?#wtf)?:foo)/ works as I don't think it should work, so for me if
> there is a missing test it is one that tests that /((?#wtf)?:foo)/
> throws an error.

I don’t disagree.  It just didn’t occur to me at the time I wrote the
tests that allowing ( ?:foo) was a bug.  (I had never thought of


Father Chrysostomos

via perlbug:  queue: perl5 status: resolved

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