Branch Coverage

blib/lib/Net/Amazon/S3/Client/Object.pm
Criterion Covered Total %
branch 45 74 60.8


line true false branch
157 6 0 unless my($metadata_name) = lc($header_name) =~ /\A x-amz-meta- (.*) \z/msx
182 3 9 if ($self->expires)
186 3 9 if ($self->content_encoding)
189 1 11 if ($self->content_disposition)
192 1 11 if ($self->cache_control)
195 1 11 if ($self->storage_class and $self->storage_class ne "standard")
198 2 10 if ($self->website_redirect_location)
215 0 7 unless $http_response->is_success
226 1 0 unless ($size)
280 5 5 ref $_[0] ? :
282 2 8 if exists $args{'acl_short'}
284 6 4 unless $args{'acl'}
291 6 4 $args{'acl'} ? :
2 8 $args{'headers'} ? :
294 0 0 unless $response->is_success
296 0 0 unless $response->upload_id
305 1 1 ref $_[0] ? :
321 1 1 ref $_[0] ? :
336 1 1 ref $_[0] ? :
340 2 0 if defined $args{'value'}
397 0 1 unless $response->is_success
403 4 2 if ($self->_is_metadata_header($header_name))
424 1 5 if exists $valid_metadata_headers{$header}
425 1 4 if $header =~ /^x-amz-(?!id-2$)/
426 2 2 if $header =~ /^content-/
436 1 3 if $metadata_name eq "Etag"
449 0 0 exists $metadata{'StorageClass'} && $metadata{'StorageClass'} eq 'GLACIER' ? :
450 0 0 exists $metadata{'Restore'} && $metadata{'Restore'} =~ /ongoing-request="false"/ ? :
451 0 0 !$glacier || $restored ? :
476 0 1 unless -r $filename and -f _ || $remaining
478 0 1 unless my $fh = "IO::File"->new($filename, "r")
486 0 0 unless ($fh->opened)
487 0 0 unless $fh = "IO::File"->new($filename, "r")
494 0 0 unless (my $read = $fh->read($buffer, $blksize))
497 0 0 if $! and $remaining
502 0 0 unless $fh->close
514 0 0 if $etag =~ /\-\d+$/