Branch Coverage

lib/AWS/Signature4.pm
Criterion Covered Total %
branch 23 42 54.7


line true false branch
85 0 1 if (ref $args{-'security_token'} and $args{-'security_token'}->can('access_key_id'))
90 0 1 unless $id ||= $args{-'access_key'} || $ENV{'EC2_ACCESS_KEY'}
92 0 1 unless $secret ||= $args{-'secret_key'} || $ENV{'EC2_SECRET_KEY'}
95 0 1 defined $args{-'security_token'} ? :
166 1 2 if (ref $arg1 and UNIVERSAL::isa($arg1, 'HTTP::Request'))
170 0 1 if $content
171 1 0 if (my $date = $request->header('X-Amz-Date') || $request->header('Date'))
182 0 3 if $uri->query_param('X-Amz-Signature')
190 0 3 if $expires
196 0 3 if (defined $$self{'security_token'})
204 0 3 if ($scope =~ m[/s3/aws4_request$]) { }
221 1 0 unless ($datetime = $request->header('x-amz-date'))
234 0 7 if ($host =~ /^([\w.-]+)\.s3\.amazonaws.com/) { }
0 7 elsif ($host =~ /^[\w-]+\.s3-([\w-]+)\.amazonaws\.com/) { }
0 7 elsif ($host =~ /^(\w+)[-.]([\w-]+)\.amazonaws\.com/) { }
7 0 elsif ($host =~ /^([\w-]+)\.amazonaws\.com/) { }
269 0 4 if $request->header('Authorization')
273 4 0 unless ($request->header('host'))
296 13 0 $date ? :
322 4 7 if $header =~ /^date$/i
326 0 7 if /^".+"$/