Branch Coverage

lib/Class/Usul/Functions.pm
Criterion Covered Total %
branch 120 182 65.9


line true false branch
222 4 0 if exists $EXPORT_REFS{$name}
229 132 962 unless defined $v and length $v
231 0 962 if &is_ntfs() and not -e $v
235 0 962 if &is_win32() and defined $v
245 5 92 $_[0] ? :
285 97 $_[0] && ref $_[0] eq 'HASH' ? :
253 1 67 if defined $v and length $v and -d "$v"
259 0 2 unless defined $x
272 40 0 if $uc ne 'XX'
38 2 unless $j == $len
274 0 2 if ($i < 4)
275 0 0 if $i < 2
0 0 if $i == 2
281 0 10 if $c[0] == $pad or $c[1] == $pad
283 0 10 if $c[2] == $pad
285 1 9 if $c[3] == $pad
294 0 2 unless defined $x
299 10 0 $len > 1 ? :
304 9 1 if ($len > 2) { }
1 0 elsif ($len == 2) { }
342 0 58 &is_arrayref($base) ? :
343 25 33 unless $relpath
345 0 33 &is_arrayref($relpath) ? :
348 0 33 if -d $path
388 7 3 if ($digest_cache) { }
391 3 0 if $digest = eval { do { 'Digest'->new($candidate) } }
394 0 3 unless $digest
427 10 0 &openhandle(*STDOUT) ? :
435 3 0 &openhandle(*STDERR) ? :
447 0 17 unless $class
449 0 17 unless &is_module_name($class)
452 8 9 if not $opts->{'ignore_loaded'} and &is_class_loaded($class)
456 0 8 unless &is_class_loaded($class)
468 1 0 defined $_[0] ? :
485 0 22 if $path = &assert_directory($default)
494 0 22 if $path = &assert_directory($ENV{"${env_pref}_HOME"})
496 0 22 if $path = &$_get_env_var_for_conf("${env_pref}_CONFIG")
499 0 22 if $path = &assert_directory(scalar catdir($path, $appdir))
501 0 22 if $path = &$_get_file_var($my_home, $app_pref, $classdir)
502 0 22 if $path = &$_get_file_var($my_home, $appdir, $classdir)
505 0 22 if $path = &assert_directory($path)
507 0 22 if $path = &assert_directory($path)
509 0 22 if $path = &$_get_known_file_var($appdir, $classdir)
512 0 22 if $path = &assert_directory($path)
514 0 22 if $path = &$_find_cfg_in_inc($classdir, $app_pref, $extns)
516 0 22 if $path = &$_find_cfg_in_inc($classdir, $appdir, $extns)
525 55 110 if $path = &abs_path(scalar catfile($_, $file)) and -f $path
551 22 0 unless &is_arrayref($dirs)
564 0 104 if -f $path
573 0 6 if &is_win32()
575 0 6 if defined $user and not $user =~ / \A \d+ \z /mx
589 1 6 unless $_[0]
593 1 5 $dir ne $dir->parent ? :
601 1278 1329 $_[0] && ref $_[0] eq 'ARRAY' ? :
605 15 43 $_[0] && ref $_[0] eq 'CODE' ? :
609 391 46 $_[0] && ref $_[0] eq 'HASH' ? :
613 0 502 unless $candidate
615 424 78 if &is_arrayref($args[0])
617 19 483 &first(sub { $_ eq $candidate; } , @args) ? :
621 0 962 &is_win32() || lc $Class::Usul::Functions::OSNAME eq 'cygwin' ? :
625 0 2501 lc $Class::Usul::Functions::OSNAME eq 'mswin32' ? :
633 1 0 unless &is_member('new', @except)
637 46 4 if $_->[0] ne 'Moo::Object'
653 48 0 &is_arrayref($args[-1]) ? :
662 111 42 $src->can($k) ? :
153 50 $class ? :
665 118 55 if defined $v
676 0 384 unless pipe $r, $w
688 0 6 defined $v ? :
694 1 6 unless $len > 0
3 3 unless defined $str and length $str
698 4 2 if not $direction or $direction eq 'right'
699 1 1 if $direction eq 'left'
712 0 1 unless socketpair $rdr, $wtr, 1, 1, 0
745 0 3 if defined $base and not length $base
746 0 3 unless $from
748 0 3 unless $from->exists
749 0 3 unless $to
750 0 3 if $to->is_link
751 0 3 if $to->exists
752 0 3 unless CORE::symlink "$from", "$to"
759 0 1 exists $INC{'threads.pm'} ? :
777 1 0 defined $_[0] ? :
801 13 1472 unless defined $string
0 1472 unless length $string
805 4 1468 unless defined $untainted and $untainted eq $string
814 0 2 $Class::Usul::Functions::OSNAME eq 'freebsd' ? :
818 2 0 if $io->exists and $io->is_readable and $red = $io->read and $red == $wanted
877 1 4 $n < 2 ? :
887 34 54 $n == 1 ? :
21 88 $n == 0 ? :