Branch Coverage

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


line true false branch
65 1 1 if $params->{'credentials'}
67 0 2 unless $params->{'baseURL'}
68 0 2 unless $params->{'baseURL'} =~ m[$Hetula::Client::RE{'URI'}{'HTTP'}{join $;, '-scheme', qr/https?/u}]u
72 2 0 unless $s->{'ua'}
89 1 2 unless $params->{'username'}
90 1 2 unless $params->{'password'}
91 1 2 unless $params->{'organization'}
95 1 2 if $json->{'error'}
140 0 1 unless $params->{'id'} =~ /$Hetula::Client::RE{'num'}{'int'}/u
186 3 18 unless $ssns and @$ssns
206 0 4 unless &Hetula::Client::open(my $FH_IN, '<:encoding(UTF-8)', $filenameIn)
207 0 4 unless &Hetula::Client::open(my $FH_OUT, '>:encoding(UTF-8)', $filenameOut)
216 16 5 if ($retry == 0)
225 10 23 if @ssns >= $batchSize
228 18 3 if (@ssns) { }
240 6 12 if (ref $ssnReports ne 'ARRAY')
245 6 0 if $ENV{'MOCK_BAD_CONNECTION'}
247 5 1 if $retry <= 3
256 0 30 unless $res->{'ssn'}{'ssn'} eq $ssn
329 0 0 unless $id
343 0 1 unless $id
344 0 1 unless $params->{'password'}
359 0 1 unless $id
384 0 1 unless &Hetula::Client::open(my $FH, '<:encoding(UTF-8)', $credentialsFile)
385 1 0 if $username and $injectHere
1 0 if ($username)
386 1 0 if $password and $injectHere
1 0 if ($password)
387 1 0 if $organization and $injectHere
1 0 if ($organization)
388 1 0 if $baseURL and $injectHere
1 0 if ($baseURL)
412 21 8 if (my $res = $tx->success) { }
413 0 21 if ($ENV{'HETULA_DEBUG'})
422 0 8 if ($ENV{'HETULA_DEBUG'})
436 0 2 unless ($@)
438 0 0 if (my $hetulaConfig = 'C4::Context'->config('hetula')) { }
439 0 0 if (my $url = $hetulaConfig->{'url'}) { }
440 0 0 unless $params->{'baseURL'}
444 0 0 unless $url
447 0 0 if (my $org = $hetulaConfig->{'organization'}) { }
448 0 0 unless $params->{'organization'}