Branch Coverage

blib/lib/Net/SFTP/Foreign/Common.pm
Criterion Covered Total %
branch 1 190 0.5


line true false branch
13 0 3 unless (eval { do { 'Scalar::Util'->import('dualvar', 'tainted'); 1 } })
38 0 0 if ($code) { }
40 0 0 if (@_)
42 0 0 if ${^TAINT} and &tainted($str)
45 0 0 unless (defined $str and length $str)
48 0 0 if $debug and $debug & 64
61 0 0 if ($code) { }
0 0 elsif ($sftp->{'_error'}) { }
63 0 0 if (@_) { }
65 0 0 if ${^TAINT} and &tainted($str)
69 0 0 $code ? :
71 0 0 if $debug and $debug & 64
75 0 0 if $sftp->{'_autodie'}
79 0 0 if ($sftp->{'_error'} != 37)
94 0 0 unless ($sftp->{'_error'} and $sftp->{'_error'} == 37)
104 0 0 @_ ? :
0 0 if $sftp->{'_error'}
109 0 0 unless $sftp->{'_error'}
110 0 0 if $sftp->{'_autodie'}
116 0 0 if ($sftp->{'_error'})
119 0 0 if ($status == 1) { }
0 0 elsif ($status == 2) { }
0 0 elsif ($status == 3) { }
0 0 elsif ($status == 5) { }
0 0 elsif ($status == 8) { }
0 0 elsif ($status) { }
144 0 0 if $best_effort
146 0 0 $best_effort || !$sftp->{'_error'} ? :
151 0 0 if $on_error and $sftp->error
159 0 0 unless @_ >= 1
162 0 0 @_ & 1 ? :
169 0 0 if $on_error
179 0 0 if %opts
181 0 0 unless defined $dirs
189 0 0 $ordered ? :
200 0 0 if ($follow or $realpath)
201 0 0 unless (defined $entry->{'realpath'})
203 0 0 unless defined $rp and not $rpdone{$rp}++
207 0 0 if ($follow)
209 0 0 if (defined $a)
217 0 0 if (not $wanted or &$wanted($self, $entry))
218 0 0 if ($wantarray) { }
223 0 0 exists $entry->{'realpath'} ? :
0 0 $names_only ? :
241 0 0 unless my $a = ($try->{'a'} ||= $self->lstat($fn))
244 0 0 if _is_dir($a->perm) and $done{$fn}++
248 0 0 if (_is_dir($a->perm))
249 0 0 if (not $descend or &$descend($self, $try))
250 0 0 if ($ordered or $atomic_readdir) { }
255 0 0 unless ($child =~ /^\.\.?$/)
261 0 0 unless my $ls = $self->ls($fn, 'ordered', $ordered, '_wanted', sub { my $child = $_[1]{'filename'}; unless ($child =~ /^\.\.?$/) { $_[1]{'filename'} = $self->join($fn, $child); return 1; } ; undef; } )
269 0 0 unless ($child =~ /^\.\.?$/)
272 0 0 if (_is_dir($entry->{'a'}->perm)) { }
280 0 0 unless $self->ls($fn, '_wanted', sub { my $entry = $_[1]; my $child = $entry->{'filename'}; unless ($child =~ /^\.\.?$/) { $entry->{'filename'} = $self->join($fn, $child); if (_is_dir($entry->{'a'}->perm)) { push @queue, $entry; } else { &$task($entry); } ; } ; undef; } )
289 0 0 wantarray ? :
294 0 0 unless @_ >= 2
295 0 0 if ${^TAINT}
298 0 0 if $glob eq ''
301 0 0 if $on_error
310 0 0 unless defined $strict_leading_dot
312 0 0 if %opts
317 0 0 if (ref $glob eq 'Regexp') { }
323 0 0 unless @parts
324 0 0 $glob =~ m[^/] ? :
334 0 0 if (ref $part eq 'Regexp') { }
344 0 0 if ($has_wildcards) { }
349 0 0 if ($e->{'filename'} =~ /$re/)
351 0 0 if (@parts || $follow_links and _is_lnk($e->{'a'}->perm))
353 0 0 if (my $a = $sftp->stat($fn)) { }
357 0 0 if $on_error
361 0 0 if (@parts) { }
0 0 elsif (not $wanted or &$wanted($sftp, $e)) { }
363 0 0 if _is_dir($e->{'a'}->perm)
365 0 0 if ($wantarray)
366 0 0 if ($realpath)
368 0 0 unless (defined $rp)
369 0 0 if $on_error
375 0 0 $realpath ? :
0 0 $names_only ? :
382 0 0 unless $sftp->ls($pfn, 'ordered', $ordered, '_wanted', sub { my $e = $_[1]; if ($e->{'filename'} =~ /$re/) { my $fn = $e->{'filename'} = $sftp->join($pfn, $e->{'filename'}); if (@parts || $follow_links and _is_lnk($e->{'a'}->perm)) { if (my $a = $sftp->stat($fn)) { $e->{'a'} = $a; } else { $sftp->_call_on_error($on_error, $e) if $on_error; return undef; } ; } ; if (@parts) { push @res, $e if _is_dir($e->{'a'}->perm); } elsif (not $wanted or &$wanted($sftp, $e)) { if ($wantarray) { if ($realpath) { my $rp = $e->{'realpath'} = $sftp->realpath($e->{'filename'}); unless (defined $rp) { $sftp->_call_on_error($on_error, $e) if $on_error; return undef; } ; } ; push @res, $names_only ? $realpath ? $e->{'realpath'} : $e->{'filename'} : $e; } ; ++$res; } ; } ; return undef; } )
386 0 0 @parts || $follow_links ? :
387 0 0 if (my $a = $sftp->$method($fn))
389 0 0 if (@parts) { }
0 0 elsif (not $wanted or &$wanted($sftp, $e)) { }
391 0 0 if _is_dir($a->{'perm'})
393 0 0 if ($wantarray)
394 0 0 if ($realpath)
396 0 0 unless (defined $rp)
397 0 0 if $on_error
401 0 0 $names_only ? :
409 0 0 wantarray ? :
417 0 0 if $a
419 0 0 if ($sftp->{'_status'} == 2)
430 0 0 if $sftp->stat($name)
432 0 0 if ($sftp->{'_status'} == 2)