Branch Coverage

blib/lib/Amazon/MWS/Routines.pm
Criterion Covered Total %
branch 30 66 45.4


line true false branch
20 0 474 ref $_[0] eq 'HASH' ? :
45 1 3 unless (exists $args->{$name})
46 0 1 if $param->{'required'}
54 0 3 if ($type =~ /^List$/)
57 0 0 unless exists $valuehash{$value}
63 0 3 if ($type =~ /(\w+)List/)
65 0 0 unless ref $value eq 'ARRAY'
75 0 3 if ($type =~ /(\w+)Array/)
76 0 0 unless ref $value eq 'ARRAY'
83 0 0 unless (defined $sub_value->[$arr_col])
91 1 2 if ($type eq 'HTTP-BODY') { }
101 1 1 $spec->{'service'} ? :
110 2 0 unless $spec->{'method'}
112 0 2 if ($spec->{'method'} eq 'POST') { }
1 1 elsif ($body) { }
145 0 2 if ($self->{'debug'})
152 0 2 if ($response->code == 400 or $response->code == 403)
159 0 2 if ($response->code == 503)
166 0 2 unless ($response->is_success)
170 0 2 if (my $md5 = $response->header('Content-MD5'))
171 0 0 unless $md5 eq md5_base64($content) . '=='
175 0 2 if $spec->{'raw_body'} or $args->{'raw_body'}
198 0 0 if (not defined $val) { }
0 0 elsif (ref $val ne 'ARRAY') { }
212 1 1 $request->method eq 'GET' ? :
231 2 0 if ($request->{'_method'} eq 'GET' or $request->{'_content'}) { }
253 0 2 if (-r $opts{'configfile'})
275 0 2 unless $opts{'access_key_id'}
276 0 2 unless $opts{'secret_key'}
277 0 2 unless $opts{'merchant_id'}
278 0 2 unless $opts{'marketplace_id'}
280 0 2 if ($opts{'debug'})
281 0 0 unless open LOG, ">$opts{'logfile'}"