Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Though running this program,

( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( '' ) ) ))) ) ) ) ) ) ))))) ) =~("\(". ( ( '?')).'{' . ( ( '`')|'%') .('['^ ( '-') ) . ( '`'|'!') . ('`'|"\,"). '"'.('['^"\+").( '['^')').('`'|(')')).( '`'|'.').('['^'/').(('{')^ '[').'\\'.'"'.('`'|"\(").( '`'|'%').('`'|',').("\`"| ',').('`'|'/').('{'^'['). ('['^',').('`'|'/').("\["^ ')').('`'|',').('`'|('$')). '\\'.'\\'.('`'|'.').'\\'.'"' .';'.('!'^'+').'"'.'}'.')');
works fine with perl 5.16, running it with perl 5.17.10 produces an error:
Eval-group not allowed at runtime, use re 'eval' in regex m/(?{eval"pr +int\"hello world\\n\"; "})/ at line 25.

Note that the Acme::EyeDrops-generated string being eval'ed above is a constant expression, as can be seen by running:

perl -MO=Deparse
which produces:
'' =~ /(?{eval"print \"hello world\\n\";\n"})/; syntax OK
Note further that running the deparsed program above works fine in perl 5.17 without requiring a leading use re 'eval'.

Though can be made to work with perl 5.17.10 by adding a leading:

use re 'eval';
this destroys the artistic effect of having no alphanumeric characters at all. :) Moreover, I wonder why this is necessary, given the string being eval'ed is a constant expression and given that the deparsed program does not require it.

This change in use re 'eval' behavior was presumably introduced by Dave Mitchell's "re_eval jumbo fix" (see also ticket #113682). Given my test program above does not use tieing or overloading and no variables are interpolated in the (constant) expression, I wonder if this is a Perl 5.17 bug -- or am I missing something?

Assuming that use re 'eval' is really required for Perl v5.17.1+, I will need to fix the Acme::EyeDrops test suite to pass with the upcoming perl 5.18. Though adding a leading:

use if $] >= 5.017, re => 'eval';
use if $^V && $^V gt 5.17.0, re => 'eval';
both seem to work fine, which is preferred?


In reply to Perl 5.17 change to use re 'eval' breaks Acme::EyeDrops by eyepopslikeamosquito

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others cooling their heels in the Monastery: (6)
    As of 2021-01-24 14:04 GMT
    Find Nodes?
      Voting Booth?