Branch Coverage

blib/lib/Net/Hadoop/WebHDFS.pm
Criterion Covered Total %
branch 8 174 4.6


line true false branch
45 0 0 if ($self->{'httpfs_mode'})
49 0 0 if $err
60 0 0 if ($self->{'httpfs_mode'})
64 0 0 if $err
76 0 0 if $err
89 0 0 if $err
102 0 0 if $err
104 0 0 unless ($dest =~ m[^/])
116 0 0 if $err
127 0 0 if $err
138 0 0 if $err
149 0 0 if $err
160 0 0 if $err
171 0 0 if $err
183 0 0 if $err
195 0 0 if $err
197 0 0 unless (defined $options{'owner'} or defined $options{'group'})
212 0 0 if $err
227 0 0 if $err
229 0 0 unless (defined $options{'modificationtime'} or defined $options{'accesstime'})
241 0 0 unless $action
259 0 0 if $err
264 0 0 if (my $name = delete $options{'names'})
265 0 0 if ref $name ne 'ARRAY'
270 0 0 if (my $rv = $self->check_success_json($res, 'XAttrs'))
271 0 0 if ref $rv ne 'ARRAY'
273 0 0 unless $flatten
283 0 0 if (my $rv = $self->check_success_json($res, 'XAttrNames'))
285 0 0 if ref $attr ne 'ARRAY'
299 0 0 if $err
301 0 0 unless exists $options{'value'}
306 0 0 unless $options{'flag'}
354 0 0 unless $fsaction
356 0 0 if $err
369 0 0 unless @sources
388 0 0 unless defined $newlength
396 0 0 if (my $rv = $self->check_success_json($res, 'boolean'))
434 0 0 unless $action
436 0 0 unless $self->can($target)
451 0 0 if $err
453 0 0 if $self->{'username'}
457 0 0 if (my $rv = $self->check_success_json($res, 'Token'))
467 0 0 unless $token
474 0 0 if (my $rv = $self->check_success_json($res, 'long'))
484 0 0 unless $token
506 0 0 unless $action
508 0 0 unless $self->can($target)
518 0 0 if $snapshotname
520 0 0 if (my $rv = $self->check_success_json($res, 'Path'))
543 0 0 unless $snapshotname
570 0 0 if scalar grep({$k eq $_;} @$opts) < 1
572 0 0 unless @ex
579 5 3 if $res->{'code'} == 200 and $res->{'content_type'} =~ m[^application/json]
584 9 1 if $path =~ m[^/]
592 4 3 $self->{'username'} ? :
2 5 $self->{'doas'} ? :
601 0 0 if ($self->{'under_failover'})
614 0 0 if ($self->{'httpfs_mode'} or not $REDIRECTED_OPERATIONS{$op})
616 0 0 if ($self->{'httpfs_mode'} and defined $payload)
624 0 0 unless ($res->{'code'} >= 300 and $res->{'code'} <= 399 and $res->{'location'})
636 0 0 unless $self->{'suppress_errors'}
655 0 0 $op ? :
657 0 0 $payload ? :
671 0 0 if ($header =~ /^location$/i) { }
0 0 elsif ($header =~ /^content-type$/i) { }
675 0 0 if $code >= 200 and $code <= 299
676 0 0 if $code >= 300 and $code <= 399
681 0 0 if ($code == 400) { }
0 0 elsif ($code == 401) { }
0 0 elsif ($code == 403) { }
0 0 elsif ($code == 404) { }
0 0 elsif ($code == 500) { }
684 0 0 if ($errmsg =~ /org\.apache\.hadoop\.ipc\.StandbyException/)
685 0 0 if ($self->{'httpfs_mode'} or not defined $self->{'standby_host'}) { }
0 0 elsif ($self->{'retrying'}) { }
714 0 0 unless (eval { do { $stat = $self->stat($path); 1 } })
716 0 0 if $eval_error =~ / FileNotFoundError\:\ \{\"RemoteException\"\:\{\"message\"\:\"File\ does\ not\ exist\: /msx
729 0 0 @_ && ref $_[-1] eq 'HASH' ? :
731 0 0 if (ref $cb ne 'CODE')
738 0 0 $opt->{'re_ignore'} ? :
748 0 0 unless ($self->exists($thing))
758 0 0 if $re_ignore and $path and $path =~ /$re_ignore/
760 0 0 if ($type eq 'DIRECTORY') { }
0 0 elsif ($type eq 'FILE') { }
765 0 0 unless (eval { do { &$looper('File::Spec'->catdir($thing, $path)); 1 } })
767 0 0 if ($suppress)
779 0 0 if ($suppress)