line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
23
|
use 5.006; |
|
1
|
|
|
|
|
3
|
|
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
587
|
use Test::More; |
|
1
|
|
|
|
|
64327
|
|
|
1
|
|
|
|
|
9
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
50
|
|
|
|
90
|
plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
|
|
797
|
my @module_files = ( |
12
|
|
|
|
|
|
|
'Task/Bootstrap/Perl/CPAN.pm' |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# no fake home requested |
18
|
|
|
|
|
|
|
|
19
|
1
|
50
|
|
|
|
15
|
my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
298
|
use File::Spec; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
21
|
|
22
|
1
|
|
|
1
|
|
562
|
use IPC::Open3; |
|
1
|
|
|
|
|
3918
|
|
|
1
|
|
|
|
|
53
|
|
23
|
1
|
|
|
1
|
|
501
|
use IO::Handle; |
|
1
|
|
|
|
|
4841
|
|
|
1
|
|
|
|
|
1691
|
|
24
|
|
|
|
|
|
|
|
25
|
1
|
50
|
|
|
|
52
|
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
|
|
4
|
my @warnings; |
28
|
1
|
|
|
|
|
5
|
for my $lib (@module_files) |
29
|
|
|
|
|
|
|
{ |
30
|
|
|
|
|
|
|
# see L |
31
|
1
|
|
|
|
|
9
|
my $stderr = IO::Handle->new; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
32
|
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); |
34
|
1
|
50
|
|
|
|
3365
|
binmode $stderr, ':crlf' if $^O eq 'MSWin32'; |
35
|
1
|
|
|
|
|
5926
|
my @_warnings = <$stderr>; |
36
|
1
|
|
|
|
|
45
|
waitpid($pid, 0); |
37
|
1
|
|
|
|
|
62
|
is($?, 0, "$lib loaded ok"); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ |
40
|
1
|
0
|
33
|
|
|
641
|
and not eval { require blib; blib->VERSION('1.01') }; |
|
0
|
|
33
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
41
|
|
|
|
|
|
|
|
42
|
1
|
50
|
|
|
|
27
|
if (@_warnings) |
43
|
|
|
|
|
|
|
{ |
44
|
0
|
|
|
|
|
0
|
warn @_warnings; |
45
|
0
|
|
|
|
|
0
|
push @warnings, @_warnings; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
is(scalar(@warnings), 0, 'no warnings found') |
52
|
1
|
0
|
0
|
|
|
175
|
or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; |
|
|
50
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|