Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Spurious re 'eval'; warning ?

by bsb (Priest)
on Aug 25, 2003 at 00:24 UTC ( [id://286280]=note: print w/replies, xml ) Need Help??


in reply to Re: Spurious re 'eval'; warning ?
in thread Spurious re 'eval'; warning ?

My guess is that you managed to stave off the runtime-eval error by tricking perl with the qr// operator

Maybe. Although putting another eval string around it doesn't seem to change anything:

$ perl -Mre=eval -e '/ (??{ eval "qr<(?{1})>" }) $_ /x' $ perl -Mre=eval -e '/ (??{ eval "q<(?{1})>" }) $_ /x' Eval-group not allowed ...
perlre has an explicit distinction for interpolating qr// objects (under (?{}) instead). The problem is that I do use re "eval", but perl seems to forget. It does seems a little bug-ish, I'll perlbug it.

perlre: (?{ })
For reasons of security, this construct is forbidden if the regular expression involves run-time interpolation of variables, unless the perilous "use re 'eval'" pragma has been used (see re), or the variables contain results of "qr//" operator (see "qr/STRING/imosx" in perlop).

Replies are listed 'Best First'.
Re: Re: Re: Spurious re 'eval'; warning ?
by diotalevi (Canon) on Aug 25, 2003 at 00:33 UTC

    And of course, the bug would be that perl isn't throwing the error but should.

      Too late... I perlbug-ed it the other way before reading your reply, otherwise I would've waited.

      I re-read your posts and the relevant man pages but still don't understand why it should be an error. "use re qw(eval)", to me, means anything goes, security be damned.

      If you convince me otherwise then I'll track down my bug report and fix it up. If you don't then the people fixing the bug can decide.

        Right - I saw your perlbug. Its up to whoever wants to actually tackle the thing. Initially when you posted the problem I was tempted to run that through gdb to see what was different but real life caught up with me and convinced me to spend my time elsewhere.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://286280]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-24 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found