blib/lib/WebDyne/Cloudflare/R2/Object.pm

filter: Statementstmt 65.5% 19 / 29 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 8 / 16 Podpod 0.0% 0 / 13 totaltotal 46.6% 28 / 60 CC 2 SCAR 4.6
CC
2
Cov
65%
new
2.0
key
2.0
version
2.0
CRAP 1.6
« blib/lib/WebDyne/Cloudflare/KV/Error.pm ↑ Summary blib/lib/WebDyne/Cloudflare/D1/Session.pm »
1 package WebDyne::Cloudflare::R2::Object;
2  
3 3 ▶use 5.020;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $VERSION='0.001';
8  
9 4 ▶sub new {
Subroutine new: called CC=2 SCAR=7.0
Pod undocumented
10 4 my ($class, $value_hr)=@_;
11 4 ▶ die "R2 object metadata must be a hash reference\n" unless ref($value_hr) eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $value_hr eq "HASH" 0 4 4
12 4 my $self=bless({%{$value_hr}}, $class);
13 4 return $self;
14 }
15  
16  
17 0 ▶sub key { return shift()->{'key'}; }
Subroutine key: not called CC=1 SCAR=6.9
Pod undocumented
18 0 ▶sub version { return shift()->{'version'}; }
Subroutine version: not called CC=1 SCAR=6.9
Pod undocumented
19 1 ▶sub size { return shift()->{'size'}; }
Subroutine size: called CC=1 SCAR=0.0
Pod undocumented
20 0 ▶sub etag { return shift()->{'etag'}; }
Subroutine etag: not called CC=1 SCAR=6.9
Pod undocumented
21 1 ▶sub http_etag { return shift()->{'http_etag'}; }
Subroutine http_etag: called CC=1 SCAR=0.0
Pod undocumented
22 0 ▶sub uploaded { return shift()->{'uploaded'}; }
Subroutine uploaded: not called CC=1 SCAR=6.9
Pod undocumented
23 0 ▶sub http_metadata { return shift()->{'http_metadata'}; }
Subroutine http_metadata: not called CC=1 SCAR=6.9
Pod undocumented
24 1 ▶sub custom_metadata { return shift()->{'custom_metadata'}; }
Subroutine custom_metadata: called CC=1 SCAR=0.0
Pod undocumented
25 0 ▶sub storage_class { return shift()->{'storage_class'}; }
Subroutine storage_class: not called CC=1 SCAR=6.9
Pod undocumented
26 0 ▶sub range { return shift()->{'range'}; }
Subroutine range: not called CC=1 SCAR=6.9
Pod undocumented
27 1 ▶sub body { return shift()->{'body'}; }
Subroutine body: called CC=1 SCAR=0.0
Pod undocumented
28  
29 0 ▶sub as_hash {
Subroutine as_hash: not called CC=1 SCAR=6.9
Pod undocumented
30 0 my ($self)=@_;
31 0 return {%{$self}};
32 }
33  
34 3 1;
« blib/lib/WebDyne/Cloudflare/KV/Error.pm ↑ Summary blib/lib/WebDyne/Cloudflare/D1/Session.pm »