Branch Coverage

blib/lib/Module/CPANTS/Kwalitee/Files.pm
Criterion Covered Total %
branch 58 122 47.5


line true false branch
25 0 11 if $^O eq 'MSWin32'
42 0 54 if $^O eq 'MSWin32'
43 0 54 unless (my $path = $name) =~ s[^\Q$distdir\E(?:/|$)][]
44 0 54 if $path eq ''
45 11 43 if $seen{$path}++
47 41 2 if ($me->d->{'is_local_distribution'})
48 0 41 if $path =~ m[/\.]
51 0 43 if ($maniskip and &$maniskip($path))
52 0 0 if $RespectManiskip
54 0 0 if (-d $name) { }
58 24 19 if (-d $name)
60 0 24 if (-l $name)
67 19 0 if (my $stat = &Module::CPANTS::Kwalitee::Files::stat($name)) { }
72 11 8 if $mtime > $latest_mtime
78 2 17 if (-l $name)
82 0 19 if ($no_index_re and $path =~ qr/$no_index_re/)
87 0 19 unless (-r $name)
93 0 19 if $path =~ m[(?:^|/)\.[^/]+/]
99 0 19 if ($path =~ m[/Makefile\.PL$] and not $path =~ m[(^|/)x?t/])
113 2 9 if (@symlinks)
117 0 11 if (@files_to_be_skipped)
121 0 11 if @base_dirs
134 0 11 if $base_dir
137 7 147 if (exists $files{$file})
139 0 7 $me->d->{$key} ? :
144 6 27 if (exists $dirs{$dir})
146 0 6 $me->d->{$key} ? :
152 6 13 unless $file =~ m[^(?:$base_dirs_re)[^/]+$]
154 0 26 if ($file =~ /$re/)
155 0 0 $me->d->{$key} ? :
168 0 11 if @ignored
174 0 0 unless $path
176 0 0 unless -e $file
177 0 0 unless open my $fh, '<', $file
178 0 0 unless my $content = do { local $/; readline $fh }
179 0 0 if $content =~ //
190 8 3 unless $meta and ref $meta eq ref {}
193 3 0 unless $no_index and ref $no_index eq ref {}
201 0 0 unless $no_index->{$type}
205 0 0 ref $no_index->{$type} eq ref [] ? :
209 0 0 unless @ignore
219 11 0 unless -f $maniskip_file and -r _
230 0 0 if ($@ or $maniskip_warning)
234 0 0 if (-f $maniskip_bak_file and not $has_maniskip_bak)
250 0 11 +(shift())->{'file_readme'} ? :
260 4 7 +(shift())->{'file_manifest'} ? :
272 3 8 if $d->{'file_meta_yml'}
273 0 7 if $d->{'is_local_distribution'} and $d->{'file_mymeta_yml'}
287 0 11 if $d->{'file_meta_json'}
288 0 10 if $d->{'is_local_distribution'} and $d->{'file_mymeta_json'}
303 0 11 if $d->{'file_makefile_pl'} or $d->{'file_build_pl'}
315 0 11 +(shift())->{'file_changelog'} ? :
325 0 11 +(shift())->{'error'}{'no_files_to_be_skipped'} ? :
335 1 10 +(shift())->{'error'}{'symlinks'} ? :
348 0 11 if $d->{'file_test_pl'} or $d->{'dir_t'}
364 0 11 if not $d->{'file_test_pl'} and $d->{'dir_t'}
369 0 0 if $d->{'file_test_pl'}
380 0 11 if ($d->{'stdin_in_makefile_pl'} or $d->{'stdin_in_build_pl'})
387 0 0 if $d->{'stdin_in_makefile_pl'}
388 0 0 if $d->{'stdin_in_build_pl'}
398 0 11 if ($d->{'error'}{'no_maniskip_error'})