Branch Coverage

lib/Hetula/Client.pm
Criterion Covered Total %
branch 47 84 55.9


line true false branch
63 1 1 if $params->{'credentials'}
65 0 2 unless $params->{'baseURL'}
66 0 2 unless $params->{'baseURL'} =~ m[$Hetula::Client::RE{'URI'}{'HTTP'}{join $;, '-scheme', qr/https?/u}]u
70 2 0 unless $s->{'ua'}
87 1 2 unless $params->{'username'}
88 1 2 unless $params->{'password'}
89 1 2 unless $params->{'organization'}
93 1 2 if $json->{'error'}
138 0 1 unless $params->{'id'} =~ /$Hetula::Client::RE{'num'}{'int'}/u
184 3 18 unless $ssns and @$ssns
204 0 4 unless &Hetula::Client::open(my $FH_IN, '<:encoding(UTF-8)', $filenameIn)
205 0 4 unless &Hetula::Client::open(my $FH_OUT, '>:encoding(UTF-8)', $filenameOut)
214 16 5 if ($retry == 0)
223 10 23 if @ssns >= $batchSize
226 18 3 if (@ssns) { }
238 6 12 if (ref $ssnReports ne 'ARRAY')
243 6 0 if $ENV{'MOCK_BAD_CONNECTION'}
245 5 1 if $retry <= 3
254 0 30 unless $res->{'ssn'}{'ssn'} eq $ssn
327 0 0 unless $id
341 0 1 unless $id
342 0 1 unless $params->{'password'}
357 0 1 unless $id
382 0 1 unless &Hetula::Client::open(my $FH, '<:encoding(UTF-8)', $credentialsFile)
383 1 0 if $username and $injectHere
1 0 if ($username)
384 1 0 if $password and $injectHere
1 0 if ($password)
385 1 0 if $organization and $injectHere
1 0 if ($organization)
386 1 0 if $baseURL and $injectHere
1 0 if ($baseURL)
410 21 8 if (my $res = $tx->success) { }
411 0 21 if ($ENV{'HETULA_DEBUG'})
420 0 8 if ($ENV{'HETULA_DEBUG'})
434 0 2 unless ($@)
436 0 0 if (my $hetulaConfig = 'C4::Context'->config('hetula')) { }
437 0 0 if (my $url = $hetulaConfig->{'url'}) { }
438 0 0 unless $params->{'baseURL'}
442 0 0 unless $url
445 0 0 if (my $org = $hetulaConfig->{'organization'}) { }
446 0 0 unless $params->{'organization'}