Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Testing if Perl Code is Valid - but don't execute!

by LanX (Saint)
on Aug 11, 2010 at 01:05 UTC ( [id://854184]=note: print w/replies, xml ) Need Help??


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

    Log In?
    Username:
    Password:

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

    How do I use this?Last hourOther CB clients
    Other Users?
    Others making s'mores by the fire in the courtyard of the Monastery: (5)
    As of 2024-03-19 10:13 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found