Also, rename the _run_closure method to _run_subprocess.
The main difference is that those tests should NOT run at uncontrolled times. For example, when someone is trying to build a debian package.
..and standardise them slightly.
Only those with a perl looking shebang line should be treated as perl
Test::Compile actually requires: * File::Spec (core since 5.4.5) * Test::Builder (core since 5.6.2) * UIVERSAL::require (not core) * version (core since 5.6.9) It is now documented as requiring: * Perl 5.6.2 (includes File::Spec & Test::Builder) * UIVERSAL::require (not core) * version (core since 5.6.9)
Test::Compile tests that modules compile, it should not be running any code. This includes import routines. It's not about testing pragmas. And some modules have wacky import routines that might not work without special setup or arguments. This also avoids problems with things like pm_file_ok("path/to/Some/Module.pm") which would try "use path::to::Some::Module" rather than "use Some::Module" and try to call "path::to::Some::Module->import". Also, it's more robust to check the return value of require than to check for $@.