Branch Coverage

lib/Amazon/S3/Bucket.pm
Criterion Covered Total %
branch 0 184 0.0


line true false branch
50 0 0 unless $self->bucket
53 0 0 unless $self->account
56 0 0 unless ($self->logger)
61 0 0 if (not $self->region and $self->verify_region) { }
0 0 elsif (not $self->region) { }
64 0 0 unless ($self->account->err)
85 0 0 if ($key)
93 0 0 if ($key)
97 0 0 if ($account->dns_bucket_names)
109 0 0 unless $key and length $key
119 0 0 if ($conf->{'acl_short'})
131 0 0 if (ref $value)
153 0 0 if ($Amazon::S3::Bucket::EVAL_ERROR)
156 0 0 if ($rsp->code eq $Amazon::S3::Bucket::HTTP_MOVED_PERMANENTLY)
180 0 0 if (ref $data) { }
220 0 0 unless $parameters->{'key'}
223 0 0 unless $parameters->{'data'} or $parameters->{'callback'} or $parameters->{'fh'}
227 0 0 if $parameters->{'callback'} and builtin::reftype($parameters->{'callback'}) ne "CODE"
232 0 0 unless ($parameters->{'callback'} or $parameters->{'fh'})
235 0 0 ref $parameters->{'data'} ? :
241 0 0 if ($parameters->{'fh'})
251 0 0 if $length < $Amazon::S3::Bucket::MIN_MULTIPART_UPLOAD_CHUNK_SIZE
259 0 0 ($parameters->{'chunk_size'} && $parameters->{'chunk_size'}) > $Amazon::S3::Bucket::MIN_MULTIPART_UPLOAD_CHUNK_SIZE ? :
263 0 0 unless $length
267 0 0 $length >= $chunk_size ? :
301 0 0 unless $buffer
317 0 0 if ($Amazon::S3::Bucket::EVAL_ERROR and $parameters->{'abort_on_error'})
335 0 0 unless $key
372 0 0 if (@args == 1) { }
373 0 0 if (builtin::reftype($args[0]) eq 'HASH') { }
0 0 elsif (builtin::reftype($args[0]) eq 'ARRAY') { }
386 0 0 if (ref $data)
392 0 0 unless $key
395 0 0 unless $upload_id
398 0 0 unless $part_number
446 0 0 if ($etag)
466 0 0 unless $key
469 0 0 unless $upload_id
472 0 0 if ref $parts_hr ne "HASH"
505 0 0 unless ($response->code =~ /\A2\d\d\z/msx)
518 0 0 unless $key
521 0 0 unless $upload_id
550 0 0 unless $key
553 0 0 unless $upload_id
623 0 0 if (ref $args[0]) { }
654 0 0 if ($uri_params and keys %{$uri_params;})
658 0 0 if (ref $filename)
675 0 0 if $response->code eq $Amazon::S3::Bucket::HTTP_NOT_FOUND
681 0 0 if ($etag)
696 0 0 if ($method eq "GET" and $response->code ne $Amazon::S3::Bucket::HTTP_PARTIAL_CONTENT)
700 0 0 $filename && -f $filename ? :
704 0 0 if $md5 ne lc $etag
709 0 0 unless $header =~ /x-amz-meta-/imsx
723 0 0 if (ref $args[0]) { }
731 0 0 unless (defined $filename)
764 0 0 if (builtin::reftype($headers_in) eq 'ARRAY') { }
0 0 elsif (builtin::reftype($headers_in) eq 'HASH') { }
771 0 0 if not ref $headers_in or builtin::reftype($headers_in) ne "HASH"
776 0 0 unless $source or exists $request_headers{'x-amz-copy-source'}
778 0 0 unless $key
784 0 0 unless ($request_headers{'x-amz-copy-source'})
802 0 0 unless ($response->code =~ /\A2\d{2}\z/msx)
815 0 0 if not $key and length $key
822 0 0 if ($version)
842 0 0 if (ref $args[0]) { }
0 0 elsif (@args) { }
843 0 0 if (builtin::reftype($args[0]) eq 'ARRAY') { }
0 0 elsif (builtin::reftype($args[0]) eq 'CODE') { }
845 0 0 if (ref $key and builtin::reftype($key) eq 'HASH') { }
851 0 0 defined $key->{'VersionId'} ? :
862 0 0 unless @object and defined $object[0]
864 0 0 defined $object[1] ? :
882 0 0 if @keys > $Amazon::S3::Bucket::MAX_DELETE_KEYS
902 0 0 if (ref $args[0] and builtin::reftype($args[0]) eq 'HASH') { }
910 0 0 if (defined $quiet_mode) { }
911 0 0 $quiet_mode ? :
955 0 0 if @_ > 1
971 0 0 if ($conf->{'marker'})
1034 0 0 if ($response->code =~ /^30/msx)
1058 0 0 if ($response->code ne $Amazon::S3::Bucket::HTTP_NOT_FOUND)
1076 0 0 unless $conf->{'acl_xml'} or $conf->{'acl_short'}
1079 0 0 if $conf->{'acl_xml'} and $conf->{'acl_short'}
1085 0 0 if ($conf->{'acl_short'})
1124 0 0 if $location
1127 0 0 if $account->_remember_errors($location)
1175 0 0 unless -r $filename and $remaining
1178 0 0 unless my $fh = "IO::File"->new($filename, "r")
1187 0 0 unless ($fh->opened)
1188 0 0 unless $fh = "IO::File"->new($filename, "r")
1198 0 0 unless ($read)
1199 0 0 if $Amazon::S3::Bucket::OS_ERROR and $remaining
1203 0 0 unless $fh->close