Branch Coverage

blib/lib/JIRA/REST.pm
Criterion Covered Total %
branch 0 100 0.0


line true false branch
25 0 0 if (@_ == 1 and ref $_[0] and ref $_[0] eq 'HASH') { }
29 0 0 if keys %{$_[0];}
36 0 0 if (not $args{'url'}) { }
0 0 elsif (not ref $args{'url'}) { }
0 0 elsif (not $args{'url'}->isa('URI')) { }
46 0 0 if ($path =~ s[(/rest/.*)$][]u)
52 0 0 if ($path =~ s[/+$][]u)
56 0 0 unless ($args{'anonymous'})
58 0 0 unless (defined $args{'username'} and defined $args{'password'})
65 0 0 if not defined $args{$_} or ref $args{$_} or length $args{$_} == 0
71 0 0 unless defined $_ and ref $_ and ref $_ eq 'HASH'
77 0 0 if (my $proxy = delete $args{'rest_client_config'}{'proxy'})
93 0 0 unless $args{'anonymous'}
100 0 0 if $args{'proxy'}
103 0 0 if $args{'ssl_verify_none'}
129 0 0 if exists $self->{'_session'}
139 0 0 if $@
140 0 0 if defined $username and defined $password
145 0 0 if $@
146 0 0 if defined $username and defined $password
162 0 0 unless eval { do { require Config::Identity; 'Config::Identity'->VERSION(0.0019) } }
171 0 0 unless eval { do { require Net::Netrc; 1 } }
173 0 0 if (my $machine = 'Net::Netrc'->lookup($URL->host, $username)) { }
185 0 0 unless $type
186 0 0 unless $code
190 0 0 if (eval { do { require HTTP::Status } })
191 0 0 if (my $status = &HTTP::Status::status_message($code))
198 0 0 if ($type =~ m[text/plain]iu) { }
0 0 elsif ($type =~ m[application/json]u) { }
0 0 elsif ($type =~ m[text/html]iu and eval { do { require HTML::TreeBuilder } }) { }
0 0 elsif ($type =~ m[^(text/|application|xml)]iu) { }
202 0 0 if (ref $error eq 'HASH') { }
209 0 0 if exists $error->{'elementErrors'}
212 0 0 if (my $errorMessages = $error->{'errorMessages'})
217 0 0 if (my $errors = $error->{'errors'})
222 0 0 if $error->{'errorMessage'}
245 0 0 unless $code =~ /^2/u
248 0 0 unless $content
250 0 0 if (not defined $type) { }
0 0 elsif ($type =~ m[^application/json]iu) { }
0 0 elsif ($type =~ m[^text/plain]iu) { }
266 0 0 unless $path =~ m[^(?:/rest/|(?i)https?:)]u
268 0 0 if (defined $query) { }
269 0 0 unless ref $query and ref $query eq 'HASH'
296 0 0 unless defined $value
312 0 0 unless defined $value
349 0 0 unless my $iter = $self->{'iter'}
351 0 0 if ($iter->{'offset'} == $iter->{'results'}{'total'}) { }
0 0 elsif ($iter->{'offset'} == $iter->{'results'}{'startAt'} + @{$iter->{'results'}{'issues'};}) { }
383 0 0 unless $response->is_success