Branch Coverage

blib/lib/File/NCopy.pm
Criterion Covered Total %
branch 18 176 10.2


line true false branch
198 0 0 unless ref $file_to eq 'GLOB' or ref $file_to eq 'FileHandle'
209 0 0 unless flock $file_from, 5
213 0 0 unless (flock $file_to, 6)
233 0 0 if $fdev == $tdev and $fino == $tino
244 0 0 unless ref $file_to eq 'GLOB' or ref $file_to eq 'FileHandle'
248 0 0 unless ref $file_to eq 'GLOB' or ref $file_to eq 'FileHandle'
262 0 0 if (ref $file_from eq 'GLOB' or ref $file_from eq 'FileHandle') { }
264 0 0 unless (open FILE_FROM, "<$file_from")
266 0 0 if $this->{'_debug'}
274 0 0 if (ref $file_to eq 'GLOB' or ref $file_to eq 'FileHandle') { }
277 0 0 unless open FILE_TO, "+<$file_to"
285 0 0 unless (-t FILE_FROM or -t FILE_TO)
286 0 0 unless $this->{'file_check'}->(\*FILE_FROM, \*FILE_TO)
293 0 0 unless ($was_handle or $this->{'test'})
296 0 0 if $this->{'force_write'}
298 0 0 unless (open FILE_TO, ">$file_to")
300 0 0 if $this->{'_debug'}
306 0 0 unless $this->{'test'}
307 0 0 unless $this->{'test'}
316 0 0 unless defined $len
319 0 0 unless $len > 0
322 0 0 unless defined $write_n
331 0 0 unless ($this->{'test'})
332 0 0 unless ref $file_from eq 'GLOB' or ref $file_from eq 'FileHandle'
334 0 0 unless ref $file_to eq 'GLOB' or ref $file_to eq 'FileHandle'
340 0 0 if $this->{'preserve'}
343 0 0 if $this->{'_debug'}
353 0 0 unless chdir $dir
375 0 0 unless (opendir DIR, $from_dir)
377 0 0 if $this->{'_debug'}
381 0 0 unless (my(@files) = readdir DIR)
383 0 0 if $this->{'_debug'}
389 0 0 unless (-e $to_dir and not $this->{'test'})
390 0 0 unless mkdir $to_dir, 511
400 0 0 if ($this->{'follow_links'})
401 0 0 if (defined($save_link = &get_path($from_dir)))
408 0 0 if /^\.\.?$/
409 0 0 if (-f $from_dir . $dir_sep . $_) { }
0 0 elsif (-d "$from_dir$dir_sep$_") { }
414 0 0 if ($this->{'follow_links'} and -l "$from_dir$dir_sep$_")
417 0 0 if (not -l "$from_dir$dir_sep$_" or $this->{'follow_links'} and defined $link and not exists $this->{'_links'}{$link}) { }
424 0 0 if (defined($link = &get_path("$from_dir$dir_sep$_")))
432 0 0 if ($made_dir)
435 0 0 if $this->{'preserve'}
440 0 0 if ($this->{'follow_links'})
457 0 0 if ($dir_from =~ tr/$_deiprs//) { }
462 0 0 if ($from_name =~ /^\.\.?$/)
467 0 0 unless ($dir_to =~ /$dir_sep$/)
486 0 0 if ($file =~ tr/$_deiprs//) { }
506 1 0 if (-d $_ and $this->{'recursive'}) { }
0 0 elsif (-f $_) { }
507 1 0 if ($this->{'test'}) { }
510 0 0 if &_docopy_dir_dir($this, $_, $dir)
515 0 0 if ($this->{'test'}) { }
518 0 0 if &_docopy_file_dir($this, $_, $dir)
532 0 1 if @_ < 2
550 1 0 if (ref $_[0] eq 'File::NCopy') { }
556 0 0 if (ref $_[0] eq 'SCALAR')
566 0 1 if $this->{'_debug'}
569 1 0 if (@args >= 2 and -d $args[$#args]) { }
0 0 elsif (@args == 2 and -f $args[0]) { }
570 0 1 if $this->{'_debug'}
575 0 0 if ($this->{'test'}) { }
578 0 0 if &_docopy_file_file($this, $args[0], $args[1])
609 1 0 if (@_ % 2 == 0) { }
0 0 elsif (ref $_[0] eq 'HASH') { }
617 1 0 if (ref $ref eq 'HASH')
619 1 0 if defined $ref->{'test'}
621 0 1 if defined $ref->{'recursive'}
623 0 1 if defined $ref->{'preserve'}
625 0 1 if defined $ref->{'follow_links'}
627 0 1 if defined $ref->{'force_write'}
629 0 1 if defined $ref->{'_debug'}
632 0 1 if defined $ref->{'set_permission'} and ref $ref->{'set_permission'} eq 'CODE'
635 0 1 if defined $ref->{'file_check'} and ref $ref->{'file_check'} eq 'CODE'
638 0 1 if defined $ref->{'set_times'} and ref $ref->{'set_times'} eq 'CODE'
647 0 0 if @_ < 1
651 0 0 unless ref $this eq 'File::NCopy'
654 0 0 @_ ? :
660 0 0 if @_ < 1
664 0 0 unless ref $this eq 'File::NCopy'
667 0 0 @_ ? :
673 0 0 if @_ < 1
677 0 0 unless ref $this eq 'File::NCopy'
680 0 0 @_ ? :
686 0 0 if @_ < 1
690 0 0 unless ref $this eq 'File::NCopy'
693 0 0 @_ ? :