Branch Coverage

lib/Badger/Filesystem.pm
Criterion Covered Total %
branch 97 140 69.2


line true false branch
128 30 28 unless @_
129 0 28 @_ == 1 && &is_object('Badger::Filesystem::Path', $_[0]) ? :
135 286 10 unless @_
136 0 10 @_ == 1 && &is_object('Badger::Filesystem::File', $_[0]) ? :
142 234 12 unless @_
143 0 12 @_ == 1 && &is_object('Badger::Filesystem::Directory', $_[0]) ? :
222 0 4014 ref $_[0] eq 'HASH' ? :
239 5 227 if exists $args->{'path'} and not defined $args->{'path'}
251 541 7 if (@_) { }
280 0 99 if (defined $p2[0] and length $p2[0])
282 0 0 unless $p1[0] eq $p2[0]
294 18 0 defined $_ ? :
301 2009 479 @_ == 1 ? :
303 0 0 ref $dir eq 'ARRAY' ? :
0 2488 if $Badger::Filesystem::DEBUG
304 509 1979 ref $dir eq 'ARRAY' ? :
312 1596 0 defined $_ ? :
313 0 532 if $Badger::Filesystem::DEBUG
314 532 0 wantarray ? :
321 78 20 wantarray ? :
331 0 473 if ($node eq $cur) { }
20 453 elsif ($node eq $up) { }
335 20 0 if @path
351 4 0 unless $path =~ /$slash/
363 22 85 $self->spec->file_name_is_absolute($self->join_directory(@_)) ? :
369 0 1 (shift())->is_absolute(@_) ? :
376 89 528 if $spec->file_name_is_absolute($path)
397 61 11 -f _ ? :
403 32 3 -d _ ? :
412 0 145 unless @stats
416 0 145 wantarray ? :
432 2 0 unless (-e $self->definitive_write($path))
441 1 1 if (-e $definitive) { }
453 0 13 unless unlink $path
461 51 0 @_ && ref $_[-1] eq 'HASH' ? :
462 29 22 $mode eq 'r' ? :
465 0 51 unless defined $path and length $path
469 0 51 if $Badger::Filesystem::DEBUG
475 2 49 if $opts->{'encoding'}
482 29 0 @_ && ref $_[-1] eq 'HASH' ? :
486 4 25 wantarray ? :
491 12 3 @_ && ref $_[-1] eq 'HASH' ? :
493 4 11 unless @_
501 4 0 @_ && ref $_[-1] eq 'HASH' ? :
503 3 1 unless @_
524 1 3 ref $from ? :
0 4 &is_object('Badger::Filesystem::Path', $from) ? :
529 0 1 ref $to ? :
3 1 &is_object('Badger::Filesystem::Path', $to) ? :
534 1 0 $action eq 'move' ? :
3 1 $action eq 'copy' ? :
541 4 0 unless (ref $dest)
551 0 4 if $file->volume
559 0 4 unless (eval { do { chdir $file->volume if $file->volume; $file->directory->must_exist($params->{'mkdir'}, $params->{'dir_mode'}); chdir $cwd } })
563 0 0 if ($@)
570 0 4 unless &$code($src, $dest)
574 3 1 unless defined $mode
576 1 3 if $file and defined $mode
593 0 5 unless eval { do { local $Carp::CarpLevel = 1; File::Path::mkpath($path, 0, @_) } }
612 0 67 if $Badger::Filesystem::DEBUG
627 66 0 unless $all or ref $self and $self->{'all_entries'}
630 67 0 wantarray ? :
637 224 0 -f _ ? :
68 224 -d _ ? :
648 68 0 wantarray ? :
663 1 0 @_ ? :
676 1 13 @_ && &is_object($vtype, $_[0]) ? :
702 79 467 if (@_ and ref $_[-1] eq "HASH")
707 11 535 if (@_ > 1) { }
530 5 elsif (@_ == 1) { }