s/eval/try/ ?
--
Affijn, Ruud
"Gewoon is een tijger."
No, string eval stays eval. Only block eval is renamed to try.
Juerd
--
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html
http://convolution.nl/gajigu_juerd_n.html
>>> s/pattern/{ eval doit() }/
>>
>> s/eval/try/ ?
>
> No, string eval stays eval. Only block eval is renamed to try.
Understood, but I was thinking about variants like
{ eval '' ~ doit() }
{ eval $\&doit }
and then wasn't sure anymore whether "eval doit()" is a string eval or
not.
$ perl5 -le 'sub x{print"<x>"; "<z>"}; print(":". eval( "x()" ) .":")'
<x>
:<z>:
$ perl5 -le 'sub x{print"<x>"; "<z>"}; print(":". eval {x()} .":")'
<x>
:<z>:
$ perl5 -le 'sub x{print"<x>"; "<z>"}; print(":". eval( {x()} ) .":")'
<x>
::
$ perl5 -le 'sub x{print"<x>"; "<z>"}; print(":". eval( x() ) .":")'
<x>
::
--
Groet, Ruud