Condition Coverage

blib/lib/cPanel/PublicAPI.pm
Criterion Covered Total %
condition 55 135 40.7


and 3 conditions

line !l l&&!r l&&r condition
90 10 0 4 exists $OPTS{'error_log'} and $OPTS{'error_log'} ne 'STDERR'
109 12 1 1 exists $OPTS{'api_token'} and exists $OPTS{'accesshash'}
118 2 2 9 !exists $OPTS{'pass'} || $OPTS{'pass'} eq '' and !exists $OPTS{'accesshash'} || $OPTS{'accesshash'} eq ''
122 0 0 9 exists $ENV{'REMOTE_PASSWORD'} and $ENV{'REMOTE_PASSWORD'}
0 0 9 exists $ENV{'REMOTE_PASSWORD'} and $ENV{'REMOTE_PASSWORD'} and $ENV{'REMOTE_PASSWORD'} ne '__HIDDEN__'
0 0 9 exists $ENV{'REMOTE_PASSWORD'} and $ENV{'REMOTE_PASSWORD'} and $ENV{'REMOTE_PASSWORD'} ne '__HIDDEN__' and exists $ENV{'SERVER_SOFTWARE'}
0 0 9 exists $ENV{'REMOTE_PASSWORD'} and $ENV{'REMOTE_PASSWORD'} and $ENV{'REMOTE_PASSWORD'} ne '__HIDDEN__' and exists $ENV{'SERVER_SOFTWARE'} and $ENV{'SERVER_SOFTWARE'} =~ /^cpsrvd/
191 7 1 1 defined $format and $format ne 'xml'
8 1 0 defined $format and $format ne 'xml' and $format ne 'json'
2 0 0 defined $format and $format ne 'xml' and $format ne 'json' and $format ne 'ref'
248 0 0 0 $self->{'security_tokens'}{$service} and $self->{'cookie_jars'}{$service}
329 0 0 0 exists $HEADERS{'transfer-encoding'} and $HEADERS{'transfer-encoding'} =~ /chunked/i
355 0 0 0 $self->{'debug'} and $@
370 0 0 0 $service and $tfa_token
419 0 0 0 $self->{'security_tokens'}{$service} and $self->{'cookie_jars'}{$service}
484 0 0 7 scalar keys %$formdata < 10 && _total_form_length($formdata, 1024) < 1024
511 0 0 5 scalar keys %$formdata < 10 && _total_form_length($formdata, 1024) < 1024
533 15 0 6 defined $opts_hr->{'format'} and $opts_hr->{'format'} eq 'json' || $opts_hr->{'format'} eq 'xml'
556 6 0 1 exists $parsed_data->{'error'} and $parsed_data->{'error'} =~ /Unknown App Requested/
6 0 0 exists $parsed_data->{'metadata'}{'reason'} and $parsed_data->{'metadata'}{'reason'} =~ /Unknown app\s+(?:\(.+\))?\s+requested/
568 4 1 0 exists $parsed_data->{'event'}{'reason'} and $parsed_data->{'event'}{'reason'} =~ /failed: Undefined subroutine/ || $parsed_data->{'event'}{'reason'} =~ /failed: Can\'t use string/
583 2 0 1 exists $parsed_data->{'cpanelresult'}{'error'} and $parsed_data->{'cpanelresult'}{'error'} =~ /Could not find function/
615 0 0 2 $self and ref $self
0 2 0 $self and ref $self and $self->{'debug'}
623 0 0 4 $self and ref $self
0 4 0 $self and ref $self and $self->{'debug'}
647 0 0 1 $self and ref $self
0 1 0 $self and ref $self and $self->{'debug'}
652 0 0 1 $self and ref $self
0 1 0 $self and ref $self and $self->{'debug'}

or 2 conditions

line l !l condition
67 1 13 $OPTS{'debug'} || 0
68 1 13 $OPTS{'timeout'} || 300
81 1 13 $OPTS{'http_tiny_creator'} || \&cPanel::PublicAPI::_create_http_tiny
195 5 4 $formdata ||= {}
227 0 0 $formdata ||= ''
228 0 0 $method ||= 'GET'
229 0 0 $headers ||= {}
236 0 0 $self->{'timeout'} || 300
293 0 0 $headers->{$key} ||= []

or 3 conditions

line l !l&&r !l&&!r condition
118 11 0 2 !exists $OPTS{'pass'} || $OPTS{'pass'} eq ''
9 0 2 !exists $OPTS{'accesshash'} || $OPTS{'accesshash'} eq ''
188 0 0 9 not defined $call or $call eq ''
245 0 0 0 $self->{'ip'} || $self->{'host'}
278 0 0 0 $method eq 'POST' or $method eq 'PUT'
350 0 0 0 $finished_request or $self->{'error'}
533 3 3 0 $opts_hr->{'format'} eq 'json' || $opts_hr->{'format'} eq 'xml'
556 1 0 6 exists $parsed_data->{'error'} and $parsed_data->{'error'} =~ /Unknown App Requested/ or exists $parsed_data->{'metadata'}{'reason'} and $parsed_data->{'metadata'}{'reason'} =~ /Unknown app\s+(?:\(.+\))?\s+requested/
568 1 0 0 $parsed_data->{'event'}{'reason'} =~ /failed: Undefined subroutine/ || $parsed_data->{'event'}{'reason'} =~ /failed: Can\'t use string/