Condition Coverage

blib/lib/Stash/REST.pm
Criterion Covered Total %
condition 46 81 56.7


and 3 conditions

line !l l&&!r l&&r condition
67 17 1 1 ref $uri ne '' and ref $uri ne 'ARRAY'
81 16 2 0 exists $conf{'headers'} and ref $conf{'headers'} eq 'HASH'
84 1 0 0 exists $conf{'headers'} and grep {/Content-Type/i;} @{$conf{'headers'};}
17 1 0 exists $conf{'files'} and (exists $conf{'headers'} and grep {/Content-Type/i;} @{$conf{'headers'};})
88 9 5 4 not $can_have_body and $data
14 4 0 not $can_have_body and $data and exists $conf{'params'}
9 5 3 not $can_have_body and $data
14 0 3 not $can_have_body and $data and not exists $conf{'params'}
9 5 0 not $can_have_body and $data
170 14 3 0 exists $conf{'is_fail'} && $conf{'is_fail'}
204 0 0 1 $data && ref $data eq 'ARRAY'
208 17 0 0 exists $conf{'process_request'} and ref $conf{'process_request'} eq 'CODE'
219 17 0 0 exists $conf{'process_response'} and ref $conf{'process_response'} eq 'CODE'
225 15 1 1 $is_fail and $res->is_success
232 14 0 0 exists $conf{'process_response_success'} and ref $conf{'process_response_success'} eq 'CODE'
237 0 12 1 exists $conf{'method'} and $conf{'method'} eq 'HEAD'
243 12 0 0 exists $conf{'response_decoded'} and ref $conf{'response_decoded'} eq 'CODE'
253 0 4 0 ref $obj eq 'HASH' and exists $obj->{'id'}
257 0 4 0 $item_url and $conf{'automatic_load_item'}
263 3 0 0 exists $conf{'item_loaded'} and ref $conf{'item_loaded'} eq 'CODE'
272 3 0 0 exists $conf{'stash_added'} and ref $conf{'stash_added'} eq 'CODE'
277 1 10 0 $stashkey and exists $conf{'list'}
284 2 0 0 exists $conf{'list_loaded'} and ref $conf{'list_loaded'} eq 'CODE'
312 0 5 1 $prepare_request and ref $prepare_request ne 'CODE'
372 0 3 0 $prepare_request and ref $prepare_request ne 'CODE'

or 3 conditions

line l !l&&r !l&&!r condition
173 13 4 0 $code ||= $is_fail ? 400 : 201
226 1 0 15 $is_fail or $res->is_success