Branch Coverage

blib/lib/Gallery/Remote/API.pm
Criterion Covered Total %
branch 39 54 72.2


line true false branch
72 1 3 unless my $u = $self->username
74 1 2 unless my $p = $self->password
91 0 3 unless $command
92 1 2 unless defined $params
99 3 0 if ($self->version == 2) { }
101 0 10 if $_ =~ /^userfile/
107 0 3 if (my $uf = $$params{'userfile'})
111 0 3 if (my $ufn = $$params{'userfile_name'})
120 0 3 $command eq 'add-item' ? :
127 2 1 if ($res->is_success)
141 2 0 if (my $response = $self->response)
151 0 2 unless open my $fh, '+>', \$virtualfile
169 0 2 if (my $ef = Dive($result, ('album', 'info', 'extrafields')))
177 0 2 if (my $ef = Dive($result, 'extrafields'))
182 0 2 unless (exists $$result{'status'})
187 2 0 unless ($$result{'status'})
189 0 2 if (my $newtoken = $$result{'auth_token'})
218 1 7 unless (ref $args eq 'HASH')
225 6 9 if ($_ eq 'url' and my $u = $$args{'url'}) { }
6 3 elsif ($_ eq 'version') { }
3 0 elsif ($self->can($_)) { }
227 1 5 if (ref $u and blessed $u and $u->isa('URI')) { }
1 4 elsif (ref $u) { }
234 4 0 unless substr($u, 0, 7) eq 'http://'
239 5 1 if ($$args{$_} =~ /^[12]$/) { }
254 4 1 if (my $u = $cleanargs{'url'}) { }
257 3 1 if ($v == 2)