in reply to Testing if Perl Code is Valid - but don't execute!

If you

  • only accept Perl-code in your configs with lower case letters and
  • can restrict the load paths for useable moduls and
  • are sure that there won't be any untrusted code in the file system accessible with do ¹ AND
  • I haven't forgotten any other back-doors ...

    ... you should have a good chance that a syntax check with perl-c will not execute code.

    No guaranty given!!!

    (Looks like I invented a new kind of perl game ... :)

    Cheers Rolf

    ¹) IMHO shouldn't be a problem anyway beacuse do is run-time only.

  • Replies are listed 'Best First'.
    Re^2: Testing if Perl Code is Valid - but don't execute!
    by LanX (Saint) on Aug 11, 2010 at 10:22 UTC
      Sorry, unfortunately not that simple!

      There's a way to have compile-time execution just with lower cased code! :(

      Never mind!

      Cheers Rolf