Branch Coverage

blib/lib/Net/Google/Drive/Simple/V3.pm
Criterion Covered Total %
branch 48 252 19.0


line true false branch
65 4 1 if defined $_
66 7 1 if defined $_
67 3 1 if defined $_
68 5 1 if defined $_
70 2 1 if defined $_
74 1 34 unless (exists $param_data->{$param_name})
84 2 34 unless (exists $param_values->{$param_name})
85 1 1 if $is_required
92 1 33 unless ($validation_cb)
97 20 13 unless my $success = &$validation_cb()
109 2 19 if (my $perm_for_view = $options->{'includePermissionsForView'})
110 1 1 unless $perm_for_view eq "published"
115 8 12 if (defined $page_size)
116 4 4 unless $page_size >= 1 and $page_size <= 1000
120 6 10 if (my $upload_type = $options->{'uploadType'})
121 3 3 unless $upload_type =~ /^( media | multipart | resumable )$/msx
132 1 6 $path =~ /^http/msx ? :
134 5 2 if $options
149 13 13 if ($alt)
164 6 0 exists $options->{$_} ? :
184 1 4 if (my $param_check = $info->{'parameter_checks'})
186 1 2 unless defined $options->{$name}
190 0 2 unless ref $cb eq "CODE"
195 1 1 if $error_str
212 2 2 if ($info->{'http_method'} eq "GET" or $info->{'http_method'} eq "DELETE")
228 0 0 unless ref $options eq "HASH"
274 0 0 unless ref $options eq "HASH"
297 0 0 unless /^( drive | appDataFolder | photos )$/msx
356 0 0 unless ref $options eq "HASH"
377 0 0 unless /^web_?hook$/msx
401 0 0 unless defined $fileId and length $fileId
404 0 0 unless ref $options eq "HASH"
433 0 0 unless defined $fileId and length $fileId
436 0 0 unless defined $commentId and length $commentId
453 0 0 unless defined $fileId and length $fileId
456 0 0 unless defined $commentId and length $commentId
459 0 0 unless ref $options eq "HASH"
481 0 0 unless defined $fileId and length $fileId
484 0 0 unless ref $options eq "HASH"
509 0 0 unless defined $fileId and length $fileId
512 0 0 unless defined $commentId and length $commentId
515 0 0 unless ref $options eq "HASH"
544 0 0 unless defined $fileId and length $fileId
547 0 0 unless ref $options eq "HASH"
596 0 0 unless ref $options eq "HASH"
639 0 0 if (defined $options->{'enforceSingleParent'})
652 0 0 unless ref $options eq "HASH"
699 0 0 if (defined $options->{'enforceSingleParent'})
711 0 0 unless defined $fileId and length $fileId
728 0 0 if (defined $options->{'enforceSingleParent'})
740 0 0 unless defined $fileId and length $fileId
743 0 0 unless ref $options eq "HASH"
777 0 0 unless /^( files | shortcuts )$/msx
797 0 0 unless defined $fileId and length $fileId
856 0 0 unless /^( user | drive | domain | allDrives )$/msx
859 0 0 if ($_ eq "drive")
860 0 0 unless defined $options->{'driveId'}
868 0 0 unless /^( domain | user )$/msx
875 0 0 unless /^( drive | appDataFolder )$/msx
896 0 0 unless defined $fileId and length $fileId
899 0 0 unless ref $options eq "HASH"
941 0 0 if (defined $options->{'enforceSingleParent'})
954 0 0 unless defined $fileId and length $fileId
957 0 0 unless ref $options eq "HASH"
998 0 0 if (defined $options->{'enforceSingleParent'})
1010 0 0 unless defined $fileId and length $fileId
1013 0 0 unless ref $options eq "HASH"
1066 0 0 if (defined $options->{'enforceSingleParent'})
1080 0 0 unless defined $fileId and length $fileId
1083 0 0 unless ref $options eq "HASH"
1128 0 0 unless defined $fileId and length $fileId
1131 0 0 unless defined $permissionId and length $permissionId
1156 0 0 unless defined $fileId and length $fileId
1159 0 0 unless defined $permissionId and length $permissionId
1185 0 0 unless defined $fileId and length $fileId
1214 0 0 unless defined $fileId and length $fileId
1217 0 0 unless defined $permissionId and length $permissionId
1247 0 0 unless defined $fileId and length $fileId
1250 0 0 unless defined $commentId and length $commentId
1253 0 0 unless ref $options eq "HASH"
1270 0 0 unless /^( resolve | reopen )$/msx
1290 0 0 unless defined $fileId and length $fileId
1293 0 0 unless defined $commentId and length $commentId
1310 0 0 unless defined $fileId and length $fileId
1313 0 0 unless defined $commentId and length $commentId
1316 0 0 unless defined $replyId and length $replyId
1319 0 0 unless ref $options eq "HASH"
1341 0 0 unless defined $fileId and length $fileId
1344 0 0 unless defined $commentId and length $commentId
1347 0 0 unless ref $options eq "HASH"
1371 0 0 unless defined $fileId and length $fileId
1374 0 0 unless defined $commentId and length $commentId
1377 0 0 unless defined $replyId and length $replyId
1380 0 0 unless ref $options eq "HASH"
1407 0 0 unless defined $fileId and length $fileId
1424 0 0 unless defined $fileId and length $fileId
1427 0 0 unless defined $revisionId and length $revisionId
1451 0 0 unless defined $fileId and length $fileId
1476 0 0 unless defined $fileId and length $fileId
1479 0 0 unless defined $revisionId and length $revisionId
1482 0 0 unless ref $options eq "HASH"
1514 0 0 unless ref $options eq "HASH"
1540 0 0 unless defined $driveId and length $driveId
1557 0 0 unless defined $driveId and length $driveId
1580 0 0 unless defined $driveId and length $driveId
1620 0 0 unless defined $driveId and length $driveId
1637 0 0 unless defined $driveId and length $driveId
1640 0 0 unless ref $options eq "HASH"
1674 0 0 unless defined $path
1680 0 0 unless defined $folder_id
1683 0 0 unless my $children = $self->children_by_folder_id($folder_id, $opts, $search_opts)
1694 0 0 unless $folder_id
1699 0 0 unless defined $search_opts
1700 0 0 unless defined $opts
1702 0 0 if exists $search_opts->{'page'}
1705 0 0 if exists $search_opts->{'title'}
1711 0 0 if (defined $opts->{'q'} and length $opts->{'q'}) { }
1724 0 0 unless my $data = $self->files($opts)
1727 0 0 unless $data->{'files'}
1730 0 0 if ($item->{'labels'}{'trashed'})
1740 0 0 if ($search_opts->{'auto_paging'} and $data->{'nextPageToken'}) { }
1756 0 0 unless defined $search_opts
1770 0 0 if (defined $search_opts->{'q'} and length $search_opts->{'q'}) { }
1778 0 0 unless my $children = $self->children_by_folder_id($folder_id, {}, $search_opts)
1784 0 0 if ($child->{'title'} eq $part)
1800 0 0 if (@ids == 1)