in reply to Re^4: run-time syntax checking
in thread run-time syntax checking

Hmmm - I *really* should do development as a non-root user ...

But say I do pre-parse the string to check for unmatched curlies, I check for BEGIN and END blocks and I strip comments. Is eval "sub { $string }" usefull under these conditions ?

I don't care for security really -- I trust users to not intentionally fuck up the system.
--
Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
>>>> Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<

Replies are listed 'Best First'.
Re^6: run-time syntax checking
by diotalevi (Canon) on Feb 01, 2003 at 16:59 UTC

    And then how about $string = qq[print = "Hey look, a mushroom!  {==" ]? You can't parse Perl. Keep in mind that BEGIN is also spelled "use".


    Seeking Green geeks in Minnesota

      Keep in mind that BEGIN is also spelled "use".

      Or "no".