blib/lib/WebDyne/Cloudflare/Hyperdrive/Blob.pm

filter: Statementstmt 100% 14 / 14 Branchbran 100% 2 / 2 Conditioncond 83.3% 5 / 6 MC/DCmcdc 66.6% 2 / 3 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 87.5% 28 / 32 CC 4 SCAR 9.2
CC
4
Cov
95%
new
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.5
« blib/lib/WebDyne/Cloudflare/D1/Statement.pm ↑ Summary blib/lib/WebDyne/Cloudflare/KV/Blob.pm »
1 package WebDyne::Cloudflare::Hyperdrive::Blob;
2  
3 2 ▶use 5.020;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 our $VERSION='0.001';
8  
9 5 ▶sub new {
Subroutine new: called CC=4 SCAR=13.9
Pod undocumented
10 5 my ($class, $bytes)=@_;
11 5 ▶ die "Hyperdrive blob requires bytes\n"
Branch: 1 branch
BranchTrueFalseTotal
unless defined $bytes and not ref $bytes and utf8::downgrade($bytes, 1) 2 3 5
Condition83%5/6
defined $bytes and not ref $bytes and utf8::downgrade($bytes, 1)
!ll&&!rl&&r
113
defined $bytes and not ref $bytes
!ll&&!rl&&r
014
MC/DC66%2/3
defined $bytes and not ref $bytes and utf8::downgrade($bytes, 1)
defined $bytes not ref $bytes utf8::downgrade($bytes, 1)
Truth table75%3/4
A and not(B) and C
A= defined $bytesB= not ref $bytesC= utf8::downgrade($bytes, 1)
ABCresult
0XX0
10X0
1100
1111
12 unless (defined($bytes)&&!ref($bytes)&&utf8::downgrade($bytes, 1));
13 3 return bless({ bytes => $bytes }, $class);
14 }
15  
16  
17 3 ▶sub bytes { return shift()->{'bytes'}; }
Subroutine bytes: called CC=1 SCAR=0.0
Pod undocumented
18  
19 2 1;
« blib/lib/WebDyne/Cloudflare/D1/Statement.pm ↑ Summary blib/lib/WebDyne/Cloudflare/KV/Blob.pm »