Branch Coverage

blib/lib/Net/Todoist.pm
Criterion Covered Total %
branch 5 228 2.1


line true false branch
15 0 1 scalar @_ % 2 ? :
17 1 0 unless ($$args{'ua'})
21 1 0 unless ($$args{'json'})
40 0 0 unless ($resp->is_success)
44 0 0 if ($resp->content =~ /LOGIN_ERROR/)
58 0 1 unless ($resp->is_success)
64 1 0 wantarray ? :
69 0 0 scalar @_ % 2 ? :
80 0 0 unless ($resp->is_success)
84 0 0 unless ($resp->content =~ /api_token/)
98 0 0 unless defined $$self{'token'}
102 0 0 scalar @_ % 2 ? :
114 0 0 unless ($resp->is_success)
118 0 0 unless ($resp->content =~ /api_token/)
131 0 0 unless defined $$self{'token'}
137 0 0 unless ($resp->is_success)
143 0 0 wantarray ? :
150 0 0 unless defined $$self{'token'}
158 0 0 unless ($resp->is_success)
169 0 0 scalar @_ % 2 ? :
172 0 0 unless defined $$self{'token'}
175 0 0 unless defined $$args{'name'}
177 0 0 $$args{'color'} ? :
0 0 $$args{'indent'} ? :
0 0 $$args{'order'} ? :
187 0 0 unless ($resp->is_success)
191 0 0 if ($resp->content =~ /ERROR_NAME_IS_EMPTY/)
202 0 0 scalar @_ % 2 ? :
205 0 0 unless defined $$self{'token'}
208 0 0 unless defined $$args{'project_id'}
210 0 0 $$args{'name'} ? :
0 0 $$args{'color'} ? :
0 0 $$args{'indent'} ? :
220 0 0 unless ($resp->is_success)
224 0 0 if ($resp->content =~ /ERROR_PROJECT_NOT_FOUND/)
237 0 0 unless defined $$self{'token'}
245 0 0 unless ($resp->is_success)
250 0 0 $resp->content =~ /ok/i ? :
257 0 0 unless defined $$self{'token'}
263 0 0 unless ($resp->is_success)
269 0 0 wantarray ? :
274 0 0 scalar @_ % 2 ? :
277 0 0 unless defined $$self{'token'}
280 0 0 unless defined $$args{'old_name'}
281 0 0 unless defined $$args{'new_name'}
291 0 0 unless ($resp->is_success)
296 0 0 $resp->content =~ /ok/i ? :
303 0 0 unless defined $$self{'token'}
309 0 0 unless ($resp->is_success)
314 0 0 $resp->content =~ /ok/i ? :
321 0 0 unless defined $$self{'token'}
327 0 0 if $js_date
329 0 0 unless ($resp->is_success)
335 0 0 wantarray ? :
342 0 0 unless defined $$self{'token'}
348 0 0 if $js_date
350 0 0 unless ($resp->is_success)
356 0 0 wantarray ? :
363 0 0 unless defined $$self{'token'}
367 0 0 unless ref $item_ids eq 'ARRAY'
371 0 0 if $js_date
373 0 0 unless ($resp->is_success)
379 0 0 wantarray ? :
384 0 0 scalar @_ % 2 ? :
387 0 0 unless defined $$self{'token'}
390 0 0 unless defined $$args{'project_id'}
391 0 0 unless defined $$args{'content'}
393 0 0 $$args{'date_string'} ? :
0 0 $$args{'priority'} ? :
0 0 $$args{'js_date'} ? :
404 0 0 unless ($resp->is_success)
408 0 0 unless ($resp->content =~ /id/)
419 0 0 scalar @_ % 2 ? :
422 0 0 unless defined $$self{'token'}
425 0 0 unless defined $$args{'id'}
427 0 0 $$args{'content'} ? :
0 0 $$args{'date_string'} ? :
0 0 $$args{'priority'} ? :
0 0 $$args{'indent'} ? :
0 0 $$args{'item_order'} ? :
0 0 $$args{'js_date'} ? :
440 0 0 unless ($resp->is_success)
444 0 0 unless ($resp->content =~ /id/)
457 0 0 unless defined $$self{'token'}
460 0 0 unless defined $project_id
462 0 0 unless ref $item_ids eq 'ARRAY'
468 0 0 unless ($resp->is_success)
473 0 0 $resp->content =~ /ok/i ? :
480 0 0 unless defined $$self{'token'}
484 0 0 unless ref $item_ids eq 'ARRAY'
489 0 0 if $js_date
491 0 0 unless ($resp->is_success)
497 0 0 wantarray ? :
504 0 0 unless defined $$self{'token'}
507 0 0 if scalar @item_ids == 1 and ref $item_ids[0] eq 'ARRAY'
513 0 0 unless ($resp->is_success)
518 0 0 $resp->content =~ /ok/i ? :
525 0 0 unless defined $$self{'token'}
528 0 0 unless ref $item_ids eq 'ARRAY'
532 0 0 if $in_history
534 0 0 unless ($resp->is_success)
539 0 0 $resp->content =~ /ok/i ? :
546 0 0 unless defined $$self{'token'}
549 0 0 if scalar @item_ids == 1 and ref $item_ids[0] eq 'ARRAY'
556 0 0 unless ($resp->is_success)
561 0 0 $resp->content =~ /ok/i ? :
566 0 0 scalar @_ % 2 ? :
569 0 0 unless defined $$self{'token'}
572 0 0 unless defined $$args{'queries'}
574 0 0 unless ref $queries eq 'ARRAY'
576 0 0 $$args{'as_count'} ? :
0 0 $$args{'js_date'} ? :
585 0 0 unless ($resp->is_success)
591 0 0 wantarray ? :