Acme-MetaSyntactic-legocityundercover
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
# no fake home requested
my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
use File::Spec;
use IPC::Open3;
use IO::Handle;
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
my $stderr = IO::Handle->new;
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @warnings;
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
( run in 0.459 second using v1.01-cache-2.11-cpan-87723dcf8b7 )