Crypto/Role/Compressed.pm

filter: Statementstmt 100% 22 / 22 Branchbran 50.0% 1 / 2 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 90.9% 30 / 33 CC 3 SCAR 5.9
CC
3
Cov
92%
set_compressed
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« Crypto/Network.pm ↑ Summary Crypto/Transaction/Flags.pm »
1 package Bitcoin::Crypto::Role::Compressed;
2 11 $Bitcoin::Crypto::Role::Compressed::VERSION = '4.005';
3 40 ▶use v5.14;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 40 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 40 ▶use Mooish::Base -standard, -role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 40 ▶use Types::Common -sigs;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 40 ▶use Carp qw(carp);
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 11 has param 'compressed' => (
12 coerce => Bool,
13 default => !!1,
14 writer => -hidden,
15 );
16  
17 11 signature_for set_compressed => (
18 method => !!1,
19 positional => [Maybe [Bool], {default => undef}],
20 );
21  
22 sub set_compressed
23 484 ▶{
Subroutine set_compressed: called CC=3 SCAR=11.4
24 484 my ($self, $state) = @_;
25  
26 484 ▶ carp 'set_compressed without argument is deprecated: use set_compressed(1) instead'
Branch: 1 branch
BranchTrueFalseTotal
unless defined $state 0 484 484
27 unless defined $state;
28  
29 484 ▶ $self->_set_compressed($state // !!1);
Condition50%1/2
$state //
l!l
4840
MC/DC0%0/1
$state //
$state
Truth table50%1/2
A
A= $state
Aresult
11
00
30  
31 # chainable - undocumented behavior, but kept for backcompat
32 484 return $self;
33 }
34  
35 11 1;
36  
« Crypto/Network.pm ↑ Summary Crypto/Transaction/Flags.pm »