| 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
| |||||||||||||
| 27 | unless defined $state; | ||||||||||||
| 28 | |||||||||||||
| 29 | 484 | ▶ | $self->_set_compressed($state // !!1); | ||||||||||
|
Condition50%1/2
$state //
MC/DC0%0/1
$state //
$state
Truth table50%1/2
A
A= $state
| |||||||||||||
| 30 | |||||||||||||
| 31 | # chainable - undocumented behavior, but kept for backcompat | ||||||||||||
| 32 | 484 | return $self; | |||||||||||
| 33 | } | ||||||||||||
| 34 | |||||||||||||
| 35 | 11 | 1; | |||||||||||
| 36 | |||||||||||||