Branch Coverage

blib/lib/CPAN/Testers/ParseReport.pm
Criterion Covered Total %
branch 262 494 53.0


line true false branch
76 0 0 if $ua
89 0 0 if $ua
108 0 8 unless open my $fh, $file
124 4 0 if ($Opt{'local'}) { }
125 0 4 unless (-e $ctarget)
129 0 0 if (not -e $ctarget or -M $ctarget > 0.25)
130 0 0 if (-e $ctarget and $Opt{'verbose'})
133 0 0 unless $Opt{'quiet'}
135 0 0 if $Opt{'verbose'} and not $Opt{'quiet'}
139 0 0 if ($resp->is_success) { }
0 0 elsif (304 == $resp->code) { }
140 0 0 if $Opt{'verbose'} and not $Opt{'quiet'}
141 0 0 unless open my $fh, '>', $cheaders
144 0 0 if ($Opt{'verbose'} and $Opt{'verbose'} > 1)
145 0 0 unless $Opt{'quiet'}
149 0 0 if $Opt{'verbose'} and not $Opt{'quiet'}
169 0 4 if ($Opt{'vdistro'}) { }
178 76 1320 unless ($seen{$report->{'distversion'}}++)
185 0 4 unless ($selected_release_distrov)
189 0 4 unless $Opt{'quiet'}
197 0 520 if $Signal
213 369 0 if ($Opt{'local'}) { }
214 0 369 unless (-e $target)
220 0 0 if (-e $target) { }
0 0 elsif (-e "$target.gz") { }
225 0 0 if ($ttarget)
227 0 0 unless open my $fh, $ttarget
228 0 0 if (do { $Opt{'transport'} eq 'http_cpantesters' }) { }
0 0 elsif ($Opt{'transport'} eq 'http_cpantesters_gzip') { }
240 0 0 if ($raw_report =~ m[<title>.*(Report not found|Error).*</title>])
241 0 0 unless unlink $ttarget
244 0 0 unless (-e $target)
245 0 0 if $Opt{'verbose'} and not $Opt{'quiet'}
246 0 0 if (do { $Opt{'transport'} eq 'http_cpantesters' }) { }
0 0 elsif ($Opt{'transport'} eq 'http_cpantesters_gzip') { }
249 0 0 if ($Opt{'prefer-local-reports'}) { }
250 0 0 unless (-e $target)
256 0 0 if ($mustfetch)
258 0 0 if ($resp->is_success) { }
259 0 0 if ($Opt{'verbose'})
262 0 0 unless $Opt{'quiet'}
263 0 0 if ($Opt{'verbose'} > 1)
264 0 0 unless $Opt{'quiet'}
268 0 0 unless open my $fh, '>', $headers
277 0 0 if ($Opt{'prefer-local-reports'}) { }
278 0 0 unless (-e "$target.gz")
284 0 0 if ($mustfetch)
286 0 0 if ($resp->is_success) { }
287 0 0 if ($Opt{'verbose'})
290 0 0 unless $Opt{'quiet'}
291 0 0 if ($Opt{'verbose'} > 1)
292 0 0 unless $Opt{'quiet'}
296 0 0 unless open my $fh, '>', $headers
320 0 4 if ($Opt{'solve'})
322 0 0 unless defined $Opt{'dumpvars'}
324 0 4 if (not $Opt{'vdistro'} and $distro =~ /^(.+)-(?i:v?\d+)(?:\.\d+)*\w*$/)
329 0 4 if (my $ctdb = $Opt{'ctdb'}) { }
332 0 0 unless my $dbi = 'CPAN::WWW::Testers::Generator::Database'->new('database', $ctdb)
333 0 0 unless ($Opt{'vdistro'})
338 0 0 unless $seen{$row->[0]}++
359 0 4 unless $reports
362 1 3 if $samplesize and $samplesize >= @$reports
368 961 260 if ($samplesize)
370 184 777 unless $need
374 668 109 unless $want_this
377 0 369 if ($@)
378 0 0 if (ref $@) { }
379 0 0 if ($@->{'severity'}) { }
390 0 369 if $Signal
392 11 2 if ($samplesize)
394 12 10 unless my $minx = $Opt{'min' . $pf}
396 9 1 if ($x < $minx)
408 4 0 if ($Opt{'dumpvars'})
410 0 4 unless open my $fh, '>', $dumpfile
412 0 4 unless close $fh
414 0 4 if ($Opt{'solve'})
436 1 13 if $count_space > 12
438 0 13 if $count_equal > 12
439 0 13 if $count_space + $count_equal > 24
475 131 260 if ($Opt{'raw'} or @qr)
478 0 131 if $@
481 2 129 if (@matches) { }
482 2 0 if (@matches == 1) { }
514 2583 417 $isHTML ? :
2609 391 unless $isHTML ? /<title>((\S+)\s+(\S+))/ : /^Subject:\s*((\S+)\s+(\S+))/ or /^Subject:\s*<strong>((\S+)\s+(\S+))/
517 5 386 if $s =~ /<strong>(.+)/
518 391 0 if ($s =~ /(\S+)\s+(\S+)/)
526 0 391 unless ($extract{'meta:about'})
528 0 0 unless ($extract{'meta:ok'})
539 3081 103859 if (/^--------/)
540 1448 1633 if ($previous_line[-2] and $previous_line[-2] =~ /^--------/) { }
132 2985 elsif ($previous_line[-1] and $previous_line[-1] =~ /Test Summary Report/) { }
542 355 1093 if ($current_headline =~ /PROGRAM OUTPUT/) { }
547 387 1061 if ($current_headline =~ /ENVIRONMENT AND OTHER CONTEXT/) { }
557 45882 61058 if ($extract{'meta:perl'}) { }
558 2 45880 if ($in_summary and not $extract{'conf:git_commit_id'} and /Commit id:\s*([[:xdigit:]]+)/)
565 390 60668 if (do { /Summary of my perl5 \((.+)\) configuration:/ })
571 390 60668 if ($p5)
573 224 166 if (($r, $v, $s, $p) = $p5 =~ /revision (\S+) version (\S+) subversion (\S+) patch (\S+)/) { }
160 6 elsif (($r, $v, $s) = $p5 =~ /revision (\S+) version (\S+) subversion (\S+)/) { }
6 0 elsif (($r, $v, $s) = $p5 =~ /(\d+\S*) patchlevel (\S+) subversion (\S+)/) { }
587 13316 93624 unless ($extract{'meta:from'})
588 391 12925 if (do { /^From:\s*(.+)/ unless $isHTML ? m[<div class="h_name">From:</div> <b>(.+?)</b><br/>] : /^From:\s*(.+)/ })
589 12800 516 $isHTML ? :
12926 390 unless $isHTML ? m[<div class="h_name">From:</div> <b>(.+?)</b><br/>] : /^From:\s*(.+)/
596 6 385 if $f =~ m[<strong>(.+)</strong>]
599 391 12925 if $extract{'meta:from'}
601 13577 93363 unless ($extract{'meta:date'})
602 391 13186 if (do { /^Date:\s*(.+)/ unless $isHTML ? m[<div class="h_name">Date:</div> (.+?)<br/>] : /^Date:\s*(.+)/ })
603 13170 407 $isHTML ? :
13187 390 unless $isHTML ? m[<div class="h_name">Date:</div> (.+?)<br/>] : /^Date:\s*(.+)/
610 6 385 if $date =~ m[<strong>(.+)</strong>]
626 391 752 if $dt
628 0 391 unless ($dt)
634 391 13186 if $extract{'meta:date'}
636 19300 87640 unless ($extract{'meta:writer'})
638 10 19290 if (do { /CPANPLUS, version (\S+)/ }) { }
0 19290 elsif (/created by (App::cpanminus::reporter \S+)/) { }
352 18938 elsif (/created (?:automatically )?by (\S+)/) { }
29 18909 elsif (/This report was machine-generated by (\S+) (\S+)/) { }
645 352 0 if (/\s+on\s+perl\s+([^,]+),/)
651 391 18909 if $extract{'meta:writer'}
654 46272 60668 if ($in_summary)
657 46190 82 if $qr
658 1 46271 unless (@q)
659 0 1 unless $Opt{'q'}
660 1 0 unless @q
665 390 45882 if (/^\s+Platform:$/) { }
17771 28111 elsif (/^\s*$/ or m[</pre>]) { }
242 27869 elsif ($in_characteristics) { }
7 27862 elsif ($expect_characteristics_libperl and /Characteristics of this/) { }
669 1 17770 if ($in_characteristics) { }
17761 9 elsif ($in_summary_seen_platform) { }
676 7 235 if (my($date) = /Compiled at (.+)/)
691 7 0 if $dt
693 0 7 unless ($dt)
717 6964 25609 if ($v =~ /^'(.*)'$/)
722 32455 118 if ($qr and $ck =~ /$qr/) { }
4 114 elsif ($conf_vars{$ck}) { }
730 8738 98202 if ($in_prg_output)
731 1056 7682 unless ($extract{'meta:output_from'})
732 352 704 if (/Output from (.+):$/)
738 1 8737 if (/Modules in memory:/) { }
8 8729 elsif ($expect_module_versions_report) { }
743 7 1 if (/\s+(\S+)(?:\s+(v\d\S+?))?;/) { }
1 0 elsif (/\[at .+?\]/) { }
744 5 2 defined $2 ? :
754 9122 97809 if ($in_env_context)
755 772 8350 if ($extract{'meta:writer'} =~ /^CPANPLUS\b/ or exists $extract{'env:PERL5_CPANPLUS_IS_VERSION'})
760 628 72 unless s/Perl:\s+\$\^X/\$^X/ or s/EUID:\s+\$>/\$EUID/ or s/UID:\s+\$</\$UID/ or s/EGID:\s+\$\)/\$EGID/
771 5400 3722 if (my($left, $right) = /^\s{4}(\S+)\s*=\s*(.*)$/)
772 351 5049 if ($left eq '$UID/$EUID') { }
774 4275 elsif ($left =~ /GID/) { }
785 720 106211 if ($in_test_summary)
786 132 588 if (/^(?:Result:|Files=\d)/) { }
151 437 elsif (/^(\S+)\s+\(Wstat:.+?Tests:.+?Failed:\s*(\d+)\)$/) { }
17 420 elsif (/^\s+Failed tests?:/) { }
798 10980 95951 if ($expect_prereq or $expect_toolchain)
799 11 10969 if (/Perl module toolchain versions installed/)
805 8298 2671 if (exists $moduleunpack->{'type'})
808 1776 6522 if ($moduleunpack->{'type'} == 1) { }
90 6432 elsif ($moduleunpack->{'type'} == 2) { }
6432 0 elsif ($moduleunpack->{'type'} == 3) { }
810 0 1776 if $@
811 347 1429 if ($leader =~ /^-/) { }
5 1424 elsif ($leader =~ /^( buil # build_requires: |conf # configure_requires: )/x) { }
352 1072 elsif ($module =~ /^( - # line drawing )/x) { }
827 0 90 if $@
832 0 90 if ($leader =~ /^\*/) { }
4 86 elsif (not defined $v && defined $needwant or $v =~ /\s/ or $needwant =~ /\s/) { }
845 0 6432 if $@
846 358 6074 if (not $module) { }
351 5723 elsif ($module =~ /^-/) { }
855 6515 370 if ($module)
859 26 6489 if (defined $modulename and defined $versionlead)
863 5 6510 if ($v eq 'Have')
867 787 5723 if (defined $needwant)
874 347 9204 if (/(\s+)(Module\s+)(Need\s+)Have/) { }
7 9197 elsif (/(\s+)(Module Name\s+)(Have)(\s+)Want/) { }
893 713 104789 if (/PREREQUISITES|Prerequisite modules loaded/)
897 709 104793 if ($expecting_toolchain_soon)
898 358 351 if (/(\s+)(Module(?:\sName)?\s+) Have/)
908 347 105155 if (/toolchain versions installed/)
913 1 390 if (not $extract{'mod:CPANPLUS'} and $extract{'meta:writer'} =~ /^CPANPLUS\s(\d+(\.\d+))$/)
916 1 390 if (not $extract{'meta:perl'} and $fallback_p5)
919 0 1 if defined $patch
922 0 391 if (my $filtercbbody = $Opt{'filtercb'})
926 1 390 if ($Opt{'solve'})
927 0 0 if ($extract{'conf:osvers'} and $extract{'conf:archname'})
930 0 1 if ($extract{'meta:perl'} and $extract{'conf:osname'})
938 389 2 if (my $qr = $Opt{'dumpvars'})
941 48986 0 if ($k =~ /$qr/)
950 0 391 unless $Opt{'quiet'}
951 0 391 if ($Opt{'raw'})
953 0 0 unless $Opt{'quiet'}
955 0 391 if ($Opt{'interactive'})
956 0 0 unless eval { do { require IO::Prompt; 1 } }
967 0 0 unless $Opt{'quiet'}
968 0 0 if ($ans eq 'y') { }
0 0 elsif ($ans eq 'q') { }
971 0 0 unless open my $lfh, '|-', $Opt{'pager'}
974 0 0 unless close $lfh
986 1 390 if ($report = $Opt_ref->{'article'})
990 390 1 if ($target)
993 387 3 if (do { -e $target }) { }
3 0 elsif (-e "$target.gz") { }
995 0 387 unless open my $fh, '<', $target
998 0 3 unless open my $fh, '<', "$target.gz"
1017 374 16 if ($isHTML)
1018 5 369 if ($raw_report =~ m[^<\?.+?<html.+?<head.+?<body.+?<pre[^>]*>(.+)</pre>.*</body>.*</html>]s)
1023 369 21 if ($isHTML) { }
8 13 elsif ($raw_report =~ /^MIME-Version: 1.0$/m or _looks_like_qp($raw_report)) { }
1032 0 8 if (not $report or $@)
1034 0 0 if ($raw_report =~ /Subject:.+Dear.+Perl.+Summary/s)
1042 1 390 if ($report =~ /\r\n/)
1152 0 0 if (my $ycbbody = $Opt{'ycb'}) { }
1154 0 0 if $@
1159 0 0 if ($rec->{'meta:ok'} eq 'PASS') { }
0 0 elsif ($rec->{'meta:ok'} eq 'FAIL') { }
1168 0 0 if $variable eq '==DATA=='
1169 0 0 if ($never_solve_on{$variable})
1170 0 0 unless $Opt{'quiet'}
1176 0 0 if ($normalize_numeric{$variable}) { }
1184 0 0 if ($pf->{'PASS'} or $pf->{'FAIL'})
1188 0 0 $normalize_value{$variable} ? :
1191 0 0 unless $seen{$Xele}++
1194 0 0 if ($pf->{'PASS'} xor $pf->{'FAIL'})
1198 0 0 if length $value > 3 + $vl
1200 0 0 if ($poor_mans_freehand_estimation)
1213 0 0 unless $Opt{'quiet'}
1214 0 0 unless @X > 1
1222 0 0 unless defined $y
1228 0 0 if ($x =~ /^eq_(.+)/) { }
0 0 elsif ($x =~ /^n_(.+)/) { }
1230 0 0 if (exists $rec->{$variable} and defined $rec->{$variable})
1236 0 0 $normalize_value{$variable} ? :
1238 0 0 if ($use_v eq $read_v)
1246 0 0 if ($@)
1257 0 0 unless $Opt{'quiet'}
1260 0 0 1 == $_->rsq ? :
1261 0 0 if $max_rsq and $max_rsq > $top
1270 0 0 unless $b->rsq <=> $a->rsq
1276 0 0 if ($@)
1279 0 0 if --$top <= 0
1305 0 0 if grep {0 == $_;} @e
1307 0 0 if ($@) { }
1308 0 0 if ($opt->{'verbose'} and $opt->{'verbose'} >= 2)