Branch Coverage

blib/lib/Net/Google/Drive/Simple/V2.pm
Criterion Covered Total %
branch 11 90 12.2


line true false branch
35 0 0 unless (defined $search_opts)
43 0 0 unless (defined $opts)
49 0 0 if (my $title = $search_opts->{'title'})
51 0 0 if (defined $opts->{'q'} and length $opts->{'q'})
63 0 0 unless defined $data
67 0 0 if ($item->{'kind'} eq 'drive#file') { }
69 0 0 unless (defined $file)
81 0 0 if ($search_opts->{'page'} and $data->{'nextPageToken'}) { }
116 0 0 unless defined $data
126 0 0 unless defined $opts
140 0 0 unless (defined $file_id)
151 0 0 $opts->{'title'} ? :
153 0 0 unless defined $data
164 0 0 if ($self->http_put($url, {"Content-Type", $mime_type, "Content", $file_data, "Content-Length", $file_length}))
185 0 0 if ($self->http_put($url, {"Accept", "application/json", "Content-Type", "application/json", "Content", &to_json({"title", $new_name})}))
219 0 0 if ($resp->is_error)
234 0 0 unless (defined $path and defined $target_folder)
241 0 0 unless (defined $file_id)
247 0 0 unless (defined $target_folder_id)
257 0 0 unless ($self->http_delete($url))
263 0 0 unless ($self->http_json($url, {"id", $file_id}))
275 0 0 unless defined $search_opts
295 0 0 unless defined $children
299 0 0 if ($child->title eq $part)
314 0 0 if (@ids == 1)
330 0 0 unless defined $file_id
334 0 0 if ($self->http_delete($url))
356 0 0 if ($resp->is_error)
371 0 1 unless defined $search_opts
372 1 0 unless exists $search_opts->{'page'}
374 1 0 unless (defined $opts)
383 0 1 if (my $title = $search_opts->{'title'})
394 0 1 unless defined $data
402 0 1 if ($search_opts->{'page'} and $data->{'nextPageToken'}) { }
419 0 1 unless defined $path
421 1 0 unless defined $search_opts
425 0 1 unless defined $folder_id
433 0 1 unless defined $children
435 0 1 wantarray ? :
446 0 0 unless (defined $opts)
462 0 0 unless defined $data
470 0 0 if ($search_opts->{'page'} and $data->{'nextPageToken'}) { }
488 0 0 if (ref $url)
500 0 0 if ($resp->is_error)
507 0 0 if ($local_file)