| 1 | package Unblock::HTTP3::_Bytes; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 10 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 10 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 10 | ▶ | use Carp qw(croak); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 10 | our $VERSION = '0.13'; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 84 | ▶ | sub byte_string { | ||||||||||||||||||||||||||
|
Subroutine
byte_string: called CC=4 SCAR=15.2
Pod
undocumented
| |||||||||||||||||||||||||||||
| 11 | 84 | my ($name, $value) = @_; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 84 | ▶ | croak "$name must be a defined plain scalar" | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $value and not ref $value
MC/DC0%0/2
defined $value and not ref $value
defined $value
not ref $value
Truth table33%1/3
A and not(B)
A= defined $valueB= not ref $value
| |||||||||||||||||||||||||||||
| 14 | unless defined($value) && !ref($value); | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 84 | my $copy = "$value"; | |||||||||||||||||||||||||||
| 17 | 84 | ▶ | croak "$name must be a byte string" | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 18 | unless utf8::downgrade($copy, 1); | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 84 | return $copy; | |||||||||||||||||||||||||||
| 21 | } | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | 10 | 1; | |||||||||||||||||||||||||||