Subject: | all_pl_files_ok/pl_file_ok spams to stderr/stdout: breaks TAP protocol |
it runs `perl -c`
`perl -c` prints `path/to/script` syntax OK
so the module breaks TAP protocol
I think that it should reopen STDERR/STDOUT before run child check process.
Example:
```
cat t/005_compile.t
use warnings;
use strict;
use utf8;
use open qw(:std :utf8);
use lib qw(lib ../lib);
use Test::More;
plan tests => 2;
use Test::Compile;
use File::Spec;
subtest 'Perl modules' => sub { all_pm_files_ok };
subtest 'Perl files' => sub { all_pl_files_ok };
```
```
$ perl t/005_compile.t
1..2
# Subtest: Perl modules
1..2
ok 1 - Compile test for lib/TWorker/Config.pm
ok 2 - Compile test for lib/TWorker/HTTP.pm
ok 1 - Perl modules
# Subtest: Perl files
1..1
script/daemon/http_worker syntax OK
ok 1 - Compile test for script/daemon/http_worker
ok 2 - Perl files
$ prove t/005_compile.t
t/005_compile.t .. 1/2 script/daemon/http_worker syntax OK
t/005_compile.t .. ok
All tests successful.
Files=1, Tests=2, 1 wallclock secs ( 0.03 usr 0.00 sys + 0.21 cusr 0.02 csys = 0.26 CPU)
Result: PASS
```