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

Re: Implementing script runs

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
November 5, 2017 18:51
Subject:
Re: Implementing script runs
Message ID:
20171105185058.14138.qmail@lists-nntp.develooper.com
Karl Williamson wrote:
> But if we say
> 
> (?{simple_fold})
> 
> that's potentially confusable with the (?{...}) construct to run code.
> Now the number of potential extended modifiers is quite finite, and we
> could say that those aren't going to be code to run

No, we could not.  The example of (?{simple_fold}) *is* already valid
code to run.

> In thinking about it, I came up with
> 
> (?+{extended_modifier_1}{extended_modifier_2}: ... )
> 
> with the plus intuitively meaning "more".

If you use a plus, you do not need the braces.

    (?+extended_modiifer_1,extended_modifier_2:)

Short modifiers can go before the plus:

    (?mix+script_run:...)

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