It's much clearer now, much appreciated! 🙏🏻

Op-Tree manipulation is indeed "creative".

(I remember Merlyn complaining that the flip-flop was implemented in a similar way.)

> Its a bug which needs fixing

Well one could argue that a warning in combination with "injected" code should be enough, since it is such a rare combination. (Not sure if it's even possible to detect the interpolation of tied variables)

OTOH /o is also meant to improve performance, and executing stuff which is thrown away certainly defies this purpose.

I hope state isn't in the same trap of buggyness where the RHS is can have unexpected side effects on threaded Perl (???) °

If not the mechanism might be repurposed to fix /o.

Another, maybe easier, approach would be to semi-depricate/discourage /o by throwing a warning.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

°) I should fire up Perlbrew to install a thread free Perl to run my experiments.


In reply to Re^22: Reusing a complex regexp in multiple spots, escaping the regexp by LanX
in thread Reusing a complex regexp in multiple spots, escaping the regexp by ecm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.