Branch Coverage

blib/lib/File/Dropbox.pm
Criterion Covered Total %
branch 8 138 5.8


line true false branch
49 1 12 unless $self->{'root'} =~ /^(?:drop|sand)box$/
76 1 0 if $self->{'mode'} ne '<'
78 0 0 if $self->EOF
93 0 0 if $response->code != 206
99 0 0 $bytes > $length ? :
113 1 0 if $self->{'mode'} ne '<'
115 0 0 if ($self->EOF)
116 0 0 if wantarray
121 0 0 unless $self->{'eof'} or defined $/
130 0 0 if (not wantarray and $length and defined $/)
133 0 0 if (~$position)
143 0 0 if $!
144 0 0 if not $length or $bytes
149 0 0 if ($length)
151 0 0 if (wantarray and defined $/)
164 0 0 if $position < length $_
187 1 0 if $self->{'mode'} ne '<'
193 0 0 if ($whence == 0) { }
0 0 elsif ($whence == 1) { }
0 0 elsif ($whence == 2) { }
211 0 0 if $self->{'position'} < 0
220 1 0 if $self->{'mode'} ne '<'
231 1 0 if $self->{'mode'} ne '>'
234 0 0 if $offset and $offset != $self->{'offset'} + $self->{'length'}
252 0 0 if $self->{'closed'}
256 0 0 if ($mode eq '>')
257 0 0 if ($self->{'length'} or not $self->{'upload_id'})
259 0 0 unless $self->__flush__
268 0 0 if $mode eq '>'
279 0 0 unless $file
284 0 0 if $mode eq 'r'
285 0 0 if $mode eq 'a' or $mode eq 'w'
287 0 0 unless $mode eq '<' or $mode eq '>'
291 0 0 unless $self->{'closed'}
303 0 0 unless $self->{'path'} = $file
306 0 0 if $mode eq '<' and not $self->__meta__
319 1 0 if $self->{'mode'} ne '<'
331 0 0 $_[0]{'oauth2'} ? :
344 0 0 if $self->{'closed'}
347 0 0 unless $self->{'closed'}
352 0 0 if $self->{'upload_id'}
355 0 0 if $self->{'upload_id'}
358 0 0 unless $self->{'closed'}
362 0 0 if (not $self->{'closed'}) { }
376 0 0 if $response->code != 200
380 0 0 if $self->{'closed'}
382 0 0 unless ($self->{'upload_id'})
401 0 0 if $self->{'hash'}
407 0 0 if ($code == 200) { }
0 0 elsif ($code != 304) { }
411 0 0 if ($meta->{'is_deleted'})
419 0 0 if ($meta->{'is_dir'})
441 0 0 if ($type eq 'move' or $type eq 'copy') { }
456 0 0 if $response->code != 200
468 0 0 if ($code == 400) { }
0 0 elsif ($code == 401 or $code == 403) { }
0 0 elsif ($code == 404) { }
0 0 elsif ($code == 406) { }
0 0 elsif ($code == 500 and $response->content =~ /\A(?:Cannot|Failed)/) { }
0 0 elsif ($code == 503) { }
0 0 elsif ($code == 507) { }
510 0 0 unless ref $handle eq 'GLOB'
513 0 0 if $hash
516 0 0 if (open $handle, '<', $path || '/' or $! != 21)
528 0 0 unless ref $handle eq 'GLOB'
531 0 0 unless close $handle
548 0 0 if $response->code != 200
565 0 0 unless ref $handle eq 'GLOB'
571 0 0 if $self->{'mode'} eq '>'