Branch Coverage

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


line true false branch
25 0 12 if $^O eq "MSWin32"
42 0 57 if $^O eq "MSWin32"
43 0 57 unless (my $path = $name) =~ s[^\Q$distdir\E(?:/|$)][]
44 0 57 if $path eq ""
45 12 45 if $seen{$path}++
47 43 2 if ($me->d->{'is_local_distribution'})
48 0 43 if $path =~ m[/\.]
51 0 45 if ($maniskip and &$maniskip($path))
52 0 0 if $RespectManiskip
54 0 0 if (-d $name) { }
58 25 20 if (-d $name)
60 0 25 if (-l $name)
67 20 0 if (my $stat = &Module::CPANTS::Kwalitee::Files::stat($name)) { }
72 12 8 if $mtime > $latest_mtime
78 2 18 if (-l $name)
82 0 20 if ($no_index_re and $path =~ qr/$no_index_re/)
87 0 20 unless (-r $name)
93 0 20 if $path =~ m[(?:^|/)\.[^/]+/]
99 0 20 if ($path =~ m[/Makefile\.PL$] and not $path =~ m[(^|/)x?t/])
113 2 10 if (@symlinks)
117 0 12 if (@files_to_be_skipped)
121 0 12 if @base_dirs
134 0 12 if $base_dir
137 7 161 if (exists $files{$file})
139 0 7 $me->d->{$key} ? :
144 6 30 if (exists $dirs{$dir})
146 0 6 $me->d->{$key} ? :
152 7 13 unless $file =~ m[^(?:$base_dirs_re)[^/]+$]
154 0 26 if ($file =~ /$re/)
155 0 0 $me->d->{$key} ? :
168 0 12 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 9 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 12 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)
253 0 12 +(shift())->{'file_readme'} ? :
263 4 8 +(shift())->{'file_manifest'} ? :
275 3 9 if $d->{'file_meta_yml'}
276 0 8 if $d->{'is_local_distribution'} and $d->{'file_mymeta_yml'}
290 0 12 if $d->{'file_meta_json'}
291 0 11 if $d->{'is_local_distribution'} and $d->{'file_mymeta_json'}
306 0 12 if $d->{'file_makefile_pl'} or $d->{'file_build_pl'}
318 0 12 +(shift())->{'file_changelog'} ? :
328 0 12 +(shift())->{'error'}{'no_files_to_be_skipped'} ? :
338 1 11 +(shift())->{'error'}{'symlinks'} ? :
351 0 12 if $d->{'file_test_pl'} or $d->{'dir_t'}
367 0 12 if not $d->{'file_test_pl'} and $d->{'dir_t'}
372 0 0 if $d->{'file_test_pl'}
383 0 12 if ($d->{'stdin_in_makefile_pl'} or $d->{'stdin_in_build_pl'})
390 0 0 if $d->{'stdin_in_makefile_pl'}
391 0 0 if $d->{'stdin_in_build_pl'}
401 0 12 if ($d->{'error'}{'no_maniskip_error'})