in reply to Re: Unexpected 'panic: top_env' in regex match
in thread Unexpected 'panic: top_env' in regex match

Thank you - I'm still using 5.6.1, so this may indeed have caused the error. The regex thas was triggering this itself was m/(?(?{!$i})(?{s{[\w\s]*(?<=u\ )\w+.*}{just };print)|(?{print}))/, part of my (as of yet unfinished) attempts to write my first obfuscated bit of perl.

--
mowgli

  • Comment on Re: Re: Unexpected 'panic: top_env' in regex match

Replies are listed 'Best First'.
Re^2: Unexpected 'panic: top_env' in regex match
by diotalevi (Canon) on Jan 21, 2003 at 18:43 UTC

    The expression engine is not re-entrant. You attempted to do a substitution during an eval during a conditional in a match. Also, it looks like you forgot the include the closing curly brace for your eval block right after the {just };print). I've had similar success with re-entrant regexes. Some work, some fail miserably. It's just sheer luck (or astounding insight) that keeps two simultaneously executing regexes from killing each other.


    Seeking Green geeks in Minnesota

      Thank you a lot! The missing curly brace is probably just a typo in the node's text; the script itself, with the corrected assertion, works. With regard to nested regexes, are there plans to remove this limitation in Perl 6? Granted, it might not be a feature that would often be used, but then, the same holds probably true for match-time code evaluation, anyway.

      --
      mowgli