4
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.033
6
use Test::More tests => 4 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
13
'Test/Roo/Cookbook.pm',
19
# fake home for cpan-testers
21
local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 );
29
for my $lib (@module_files)
31
# see L<perlfaq8/How can I capture STDERR from an external command?>
32
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
33
my $stderr = IO::Handle->new;
35
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, '-Mblib', '-e', "require q[$lib]");
36
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
37
my @_warnings = <$stderr>;
39
is($? >> 8, 0, "$lib loaded ok");
44
push @warnings, @_warnings;
50
is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};