line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
16
|
use 5.006; |
|
1
|
|
|
|
|
2
|
|
2
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
16
|
|
3
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
19
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
498
|
use Test::More; |
|
1
|
|
|
|
|
50640
|
|
|
1
|
|
|
|
|
7
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
50
|
|
|
|
70
|
plan tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0); |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
|
|
585
|
my @module_files = ( |
12
|
|
|
|
|
|
|
'Task/Bootstrap/Perl/CPAN.pm' |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# no fake home requested |
18
|
|
|
|
|
|
|
|
19
|
1
|
50
|
|
|
|
12
|
my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
244
|
use File::Spec; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
18
|
|
22
|
1
|
|
|
1
|
|
391
|
use IPC::Open3; |
|
1
|
|
|
|
|
3110
|
|
|
1
|
|
|
|
|
42
|
|
23
|
1
|
|
|
1
|
|
401
|
use IO::Handle; |
|
1
|
|
|
|
|
3849
|
|
|
1
|
|
|
|
|
1366
|
|
24
|
|
|
|
|
|
|
|
25
|
1
|
50
|
|
|
|
89
|
open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
|
|
3
|
my @warnings; |
28
|
1
|
|
|
|
|
2
|
for my $lib (@module_files) |
29
|
|
|
|
|
|
|
{ |
30
|
|
|
|
|
|
|
# see L |
31
|
1
|
|
|
|
|
7
|
my $stderr = IO::Handle->new; |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
47
|
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); |
34
|
1
|
50
|
|
|
|
2738
|
binmode $stderr, ':crlf' if $^O eq 'MSWin32'; |
35
|
1
|
|
|
|
|
4596
|
my @_warnings = <$stderr>; |
36
|
1
|
|
|
|
|
42
|
waitpid($pid, 0); |
37
|
1
|
|
|
|
|
54
|
is($?, 0, "$lib loaded ok"); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ |
40
|
1
|
0
|
33
|
|
|
494
|
and not eval { require blib; blib->VERSION('1.01') }; |
|
0
|
|
33
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
41
|
|
|
|
|
|
|
|
42
|
1
|
50
|
|
|
|
21
|
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
|
|
|
164
|
or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; |
|
|
50
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|