in reply to How to do perl -c inside perl?

Test::Compile ?

Replies are listed 'Best First'.
Re^2: How to do perl -c inside perl? (Test::Compile)
by tye (Sage) on Aug 28, 2012 at 18:25 UTC

    Diving through the (surprising number of) layers, it looks like Test::Compile just does "require Foo" and sees if that fails, rather than actually preventing the code of the module from being run. Though it does run "perl -c" for a non-module file (and doesn't handle Perl code in a string).

    - tye