Branch Coverage

lib/Transmission/Client.pm
Criterion Covered Total %
branch 42 56 75.0


line true false branch
136 0 1 if ($self->username or $self->password)
279 1 0 if (my $data = $self->rpc('session-get'))
330 1 3 if ($args{'filename'} and $args{'metainfo'}) { }
1 2 elsif ($args{'filename'}) { }
1 1 elsif ($args{'metainfo'}) { }
366 3 0 if ($self->_do_ids_action('torrent-remove', @_)) { }
398 1 1 unless (defined $args{'location'})
444 0 8 @_ == 1 ? :
447 1 7 unless (defined $args{'ids'})
452 6 1 unless (ref $args{'ids'} eq 'ARRAY')
453 1 5 if ($args{'ids'} eq 'all') { }
461 7 0 $self->rpc($method, %args) ? :
491 0 6 @_ == 1 ? :
495 1 5 if (exists $args{'fields'}) { }
1 4 elsif ($args{'lazy_read'}) { }
498 1 0 unless grep {'id' eq $_;} @{$args{'fields'};}
511 1 5 if ($args{'ids'})
512 0 1 if ($args{'ids'} eq 'all') { }
1 0 elsif (ref $args{'ids'} eq '') { }
520 6 0 if (my $data = $self->rpc('torrent-get', %args)) { }
535 1 5 if (wantarray) { }
554 0 20 unless my $method = shift()
566 8 12 if (ref $args{'ids'} eq 'ARRAY')
574 10 1 if $id =~ /^\d+$/
592 1 19 unless ($res->is_success)
593 1 0 if ($res->code == 409 and not $nested) { }
605 0 19 unless ($res->{'tag'} == $tag)
609 0 19 unless ($res->{'result'} eq 'success')