Condition Coverage

blib/lib/cPanel/PublicAPI.pm
Criterion Covered Total %
condition 53 133 39.8


and 3 conditions

line !l l&&!r l&&r condition
84 10 0 4 exists $OPTS{'error_log'} and $OPTS{'error_log'} ne 'STDERR'
103 12 1 1 exists $OPTS{'api_token'} and exists $OPTS{'accesshash'}
112 2 2 9 !exists $OPTS{'pass'} || $OPTS{'pass'} eq '' and !exists $OPTS{'accesshash'} || $OPTS{'accesshash'} eq ''
116 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/
185 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'
242 0 0 0 $self->{'security_tokens'}{$service} and $self->{'cookie_jars'}{$service}
323 0 0 0 exists $HEADERS{'transfer-encoding'} and $HEADERS{'transfer-encoding'} =~ /chunked/i
349 0 0 0 $self->{'debug'} and $@
364 0 0 0 $service and $tfa_token
413 0 0 0 $self->{'security_tokens'}{$service} and $self->{'cookie_jars'}{$service}
478 0 0 7 scalar keys %$formdata < 10 && _total_form_length($formdata, 1024) < 1024
505 0 0 5 scalar keys %$formdata < 10 && _total_form_length($formdata, 1024) < 1024
527 15 0 6 defined $opts_hr->{'format'} and $opts_hr->{'format'} eq 'json' || $opts_hr->{'format'} eq 'xml'
550 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/
562 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/
577 2 0 1 exists $parsed_data->{'cpanelresult'}{'error'} and $parsed_data->{'cpanelresult'}{'error'} =~ /Could not find function/
611 0 0 2 $self and ref $self
0 2 0 $self and ref $self and $self->{'debug'}
617 0 0 4 $self and ref $self
0 4 0 $self and ref $self and $self->{'debug'}
640 0 0 1 $self and ref $self
0 1 0 $self and ref $self and $self->{'debug'}
645 0 0 1 $self and ref $self
0 1 0 $self and ref $self and $self->{'debug'}

or 2 conditions

line l !l condition
63 1 13 $OPTS{'debug'} || 0
64 1 13 $OPTS{'timeout'} || 300
189 5 4 $formdata ||= {}
221 0 0 $formdata ||= ''
222 0 0 $method ||= 'GET'
223 0 0 $headers ||= {}
230 0 0 $self->{'timeout'} || 300
287 0 0 $headers->{$key} ||= []

or 3 conditions

line l !l&&r !l&&!r condition
112 11 0 2 !exists $OPTS{'pass'} || $OPTS{'pass'} eq ''
9 0 2 !exists $OPTS{'accesshash'} || $OPTS{'accesshash'} eq ''
182 0 0 9 not defined $call or $call eq ''
239 0 0 0 $self->{'ip'} || $self->{'host'}
272 0 0 0 $method eq 'POST' or $method eq 'PUT'
344 0 0 0 $finished_request or $self->{'error'}
527 3 3 0 $opts_hr->{'format'} eq 'json' || $opts_hr->{'format'} eq 'xml'
550 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/
562 1 0 0 $parsed_data->{'event'}{'reason'} =~ /failed: Undefined subroutine/ || $parsed_data->{'event'}{'reason'} =~ /failed: Can\'t use string/