Branch Coverage

blib/lib/Net/Amazon/S3/Client/Object.pm
Criterion Covered Total %
branch 37 82 45.1


line true false branch
105 1 0 unless ($self->_is_multipart_etag($etag))
108 0 1 if $etag ne $md5_hex
148 0 0 unless ($self->_is_multipart_etag($etag))
150 0 0 if $etag ne $md5_hex
159 6 0 unless my($metadata_name) = lc($header_name) =~ /\A x-amz-meta- (.*) \z/msx
184 3 9 if ($self->expires)
188 3 9 if ($self->content_encoding)
191 1 11 if ($self->content_disposition)
194 1 11 if ($self->cache_control)
197 1 11 if ($self->storage_class and $self->storage_class ne 'standard')
200 2 10 if ($self->website_redirect_location)
217 0 7 unless $http_response->is_success
228 1 0 unless ($size)
282 5 5 ref $_[0] ? :
284 2 8 if exists $args{'acl_short'}
286 6 4 unless $args{'acl'}
293 6 4 $args{'acl'} ? :
2 8 $args{'headers'} ? :
296 0 0 unless $response->is_success
298 0 0 unless $response->upload_id
307 1 1 ref $_[0] ? :
323 1 1 ref $_[0] ? :
338 1 1 ref $_[0] ? :
342 2 0 if defined $args{'value'}
402 0 0 unless $http_response->is_success
408 0 0 if ($self->_is_metadata_header($name))
429 0 0 if exists $valid_metadata_headers{$header}
430 0 0 if $header =~ /^x-amz-(?!id-2$)/
431 0 0 if $header =~ /^content-/
441 0 0 if $metadata_name eq 'Etag'
454 0 0 exists $metadata{'StorageClass'} && $metadata{'StorageClass'} eq 'GLACIER' ? :
455 0 0 exists $metadata{'Restore'} && $metadata{'Restore'} =~ /ongoing-request="false"/ ? :
456 0 0 !$glacier || $restored ? :
481 0 1 unless -r $filename and -f _ || $remaining
483 0 1 unless my $fh = 'IO::File'->new($filename, 'r')
491 0 0 unless ($fh->opened)
492 0 0 unless $fh = 'IO::File'->new($filename, 'r')
499 0 0 unless (my $read = $fh->read($buffer, $blksize))
502 0 0 if $! and $remaining
507 0 0 unless $fh->close
519 0 1 if $etag =~ /\-\d+$/