Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Is this code secure, can I test it on my machine?

by ikegami (Pope)
on May 23, 2010 at 19:25 UTC ( #841276=note: print w/replies, xml ) Need Help??


in reply to Re^2: Is this code secure, can I test it on my machine?
in thread Is this code secure, can I test it on my machine?

string eval is already flagged as dangerous spot and "use" too

I missed the mention of string eval. As for the use re 'eval';, it's not prevented by preventing the use of use as I suspect you can achieve the same effect without actually using use.

The new thing here is substitution with two "e"-s:

It's really just another way of writing a string eval.

s/.../.../ee
is the same as
s/.../eval "..."/e

(without making '"' special).

Do I understand correctly that a single e after the substitution would only be dangerous if the code inside is dangerous

If you consider $1 safe in code, then s/.../$1/e is safe too.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://841276]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2018-07-18 14:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (393 votes). Check out past polls.

    Notices?