in reply to Emulating -c within perl
Call perl with backticks for each file (as in `perl -c $filename`;). eval isn't meant as a code checking system--it's for trapping errors and running dynamically-generated code.
Also, be warned that any file with a BEGIN block will still have code executed under -c, so don't run this on any ol' code you find.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
Note: All code is untested, unless otherwise stated
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Emulating -c within perl
by liz (Monsignor) on Sep 12, 2003 at 15:16 UTC | |
|
Re: Re: Emulating -c within perl
by ViceRaid (Chaplain) on Sep 12, 2003 at 15:24 UTC |