Branch Coverage

lib/Yandex/Disk.pm
Criterion Covered Total %
branch 45 98 45.9


line true false branch
44 1 0 if ($res->is_success) { }
60 0 1 unless defined $overwrite
62 0 1 unless (-f $file)
66 1 0 $overwrite ? :
76 0 1 if ($code eq '409') { }
1 0 elsif ($code eq '200') { }
88 0 1 if ($show_progress_bar)
94 0 1 if ($upl_code ne '201')
106 1 2 if ($recursive)
116 2 1 if ($code eq '409') { }
0 1 elsif ($code ne '201') { }
119 2 0 if ($json_res->{'error'} eq 'DiskPathPointsToExistentDirectoryError')
138 0 1 $permanently ? :
142 1 0 if ($code eq '204') { }
0 0 elsif ($code eq '202') { }
147 0 0 if ($wait)
149 0 0 unless $self->__waitResponse($href, $WAIT_RETRY)
167 0 1 if ($code ne '200')
174 0 1 if ($show_progress_bar)
175 0 0 if ($download_url =~ /[&?]fsize=(\d+)/) { }
193 0 1 $path ? :
196 0 1 if ($code eq '204') { }
1 0 elsif ($code eq '202') { }
200 0 1 if ($wait)
202 0 0 unless $self->__waitResponse($href, $WAIT_RETRY)
207 0 0 if $path
218 1 0 unless $offset
223 0 1 if ($code ne '200')
237 1 0 unless $offset
240 0 1 if $media_type
244 0 1 if ($code ne '200')
259 0 1 if $media_type
263 0 1 if ($code ne '200')
281 0 1 unless open my $FL, ">$fname"
286 0 4 if $term
290 0 1 if $term
292 1 0 if ($res->code eq '200')
305 0 0 if ($code eq '200' and __fromJson($res->decoded_content)->{'status'} eq 'success')
326 0 1 unless my $sock = 'IO::Socket::SSL'->new('PeerAddr', $host, 'PeerPort', $port, 'Proto', 'tcp')
341 0 1 unless open my $FH, "<$file"
346 0 2 unless $sock->print($hex)
347 0 2 unless $sock->print("\r\n")
349 0 2 unless $sock->print($filebuf)
350 0 2 unless $sock->print("\r\n")
352 0 2 if $term
356 0 1 unless $sock->print("0\r\n")
357 0 1 unless $sock->print("\r\n")
362 0 1 if $term
381 3 8 ref $_[0] ? :