develooper Front page | perl.perl5.porters | Postings from August 2010

Re: RFC: New regex modifier flags

Thread Previous | Thread Next
August 4, 2010 07:22
Re: RFC: New regex modifier flags
Message ID:
On 4 August 2010 15:55, David Golden <> wrote:
> On Wed, Aug 4, 2010 at 9:12 AM, Jesse Vincent <> wrote:
>>> I would suggest we reconsider whether this is really a "deprecation"
>>> situation.  Is there any documentation that states that such
>>> constructs are legal?  I was surprised to find that they are. I would
>>> have expected it to be a syntax error.  If we instead "fix the bug"
>>> that invalid regex flags are not detected as a syntax error, then we
>>> don't have to consider this a deprecated feature and we don't have to
>>> wait two years for a sane approach.  That may lead us to favor
>>> different options.
>> "Not documented" isn't really a great metric for "is fine to break
>> without notice" unless we turn it on with the 5.14 pragma.
> That's not what I meant.  I'm saying that another valid interpretation
> is that it is a bug in the parser that Perl doesn't flag a "run-on"
> between regex modifiers and certain keywords as a syntax error.
> Of course, we can debate whether it's a bug or a feature.  But I feel
> that the default assumption so far has been "feature" and that we
> follow the "can't be removed without a deprecation cycle" policy.  I'm
> calling the question of whether this is a bug, and I believe the
> standing policy is that we don't have to be backwards compatible with
> bugs.
> If we had this debate before regex modifiers were ever introduced, I'm
> pretty confident the view would be that it's a bad idea to allow a
> run-on precisely because it closes out the extensibility of future
> regex modifiers (not to mention being just generally confusing).
> Thus, I think the behavior is a bug, not a feature.
> I was asking about documentation to see if there is any evidence to
> the contrary that would suggest this behavior was intentional design.

FWIW(IAA) I vote bug.


perl -Mre=debug -e "/just|another|perl|hacker/"

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