line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bitcoin::Crypto::Role::Compressed; |
2
|
|
|
|
|
|
|
$Bitcoin::Crypto::Role::Compressed::VERSION = '1.008'; |
3
|
10
|
|
|
10
|
|
5351
|
use v5.10; |
|
10
|
|
|
|
|
44
|
|
4
|
10
|
|
|
10
|
|
76
|
use strict; |
|
10
|
|
|
|
|
23
|
|
|
10
|
|
|
|
|
261
|
|
5
|
10
|
|
|
10
|
|
82
|
use warnings; |
|
10
|
|
|
|
|
36
|
|
|
10
|
|
|
|
|
328
|
|
6
|
10
|
|
|
10
|
|
84
|
use Types::Standard qw(Bool); |
|
10
|
|
|
|
|
29
|
|
|
10
|
|
|
|
|
124
|
|
7
|
|
|
|
|
|
|
|
8
|
10
|
|
|
10
|
|
24772
|
use Bitcoin::Crypto::Config; |
|
10
|
|
|
|
|
29
|
|
|
10
|
|
|
|
|
210
|
|
9
|
10
|
|
|
10
|
|
57
|
use Moo::Role; |
|
10
|
|
|
|
|
31
|
|
|
10
|
|
|
|
|
60
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has "compressed" => ( |
12
|
|
|
|
|
|
|
is => "rw", |
13
|
|
|
|
|
|
|
isa => Bool, |
14
|
|
|
|
|
|
|
coerce => 1, |
15
|
|
|
|
|
|
|
default => Bitcoin::Crypto::Config::compress_public_point, |
16
|
|
|
|
|
|
|
writer => "_set_compressed" |
17
|
|
|
|
|
|
|
); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub set_compressed |
20
|
|
|
|
|
|
|
{ |
21
|
54
|
|
|
54
|
0
|
1987
|
my ($self, $state) = @_; |
22
|
|
|
|
|
|
|
|
23
|
54
|
100
|
|
|
|
197
|
$state = 1 |
24
|
|
|
|
|
|
|
if @_ == 1; |
25
|
|
|
|
|
|
|
|
26
|
54
|
|
|
|
|
965
|
$self->_set_compressed($state); |
27
|
54
|
|
|
|
|
2210
|
return $self; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|