Branch Coverage

lib/XT/Files.pm
Criterion Covered Total %
branch 77 78 98.7


line true false branch
36 41 7 if (exists $args->{'-config'}) { }
37 11 30 if (defined $args->{'-config'})
59 1 4 if $class->_is_initialized
68 3 1 unless ($class->_is_initialized)
80 5 40 if defined $xtf
96 6 20 if (defined $plugin_version)
97 1 5 unless version::is_lax($plugin_version)
98 1 4 if 'version'->parse($plugin_pkg->VERSION) < 'version'->parse($plugin_version)
101 1 23 unless $plugin_pkg->can('run')
102 1 22 unless $plugin_pkg->can('new')
116 6 14 if (@excludes)
125 4 50 unless defined $self->{'_file'}{$name}
128 7 43 if defined $exclude_regex and File::Basename::fileparse($name) =~ /$exclude_regex/
131 1 42 unless -e $name
154 71 22 if (@_ > 2)
155 67 4 if (defined $file)
156 1 66 unless defined &Scalar::Util::blessed($file) and $file->isa('XT::Files::File')
221 17 13 if ($file =~ / [.] pm $ /msx) { }
6 7 elsif ($file =~ / [.] pod $ /msx) { }
236 3 3 if ($file =~ / [.] t $ /msx)
263 17 14 unless ($package_name =~ s/ ^ = //msx)
267 2 29 unless $package_name =~ / ^ [A-Za-z_] [0-9A-Za-z_]* (?: :: [0-9A-Za-z_]+ )* $ /sx
277 10 22 unless (-d $dir)
286 33 64 if -l $File::Find::name or not -f _
301 6 1 if ($key eq ':version')
302 2 4 unless version::is_lax($value)
303 2 2 if 'version'->parse('XT::Files'->VERSION) < 'version'->parse($value)
316 2 16 unless open my $fh, '<', $config
326 8 40 if $line =~ / ^ \s* (?: [#;] | $ ) /msx
334 12 28 if ($line =~ / ^ \[ /msx)
335 1 11 unless $line =~ / ^ \[ ( .+ ) \] $ /msx
343 2 25 if not defined $key && defined $value or $key eq '' or $value eq ''
345 3 22 if ($in_global_section)
352 0 10 unless close $fh
363 2 22 if $lines[0][0] == $type_section
365 3 19 if ($lines[0][2] eq ':version') { }
387 10 4 unless -e $file
388 1 3 if defined $config
392 4 2 unless (defined $config)