line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bitcoin::Crypto::Role::Network; |
2
|
|
|
|
|
|
|
$Bitcoin::Crypto::Role::Network::VERSION = '2.000_01'; # TRIAL |
3
|
|
|
|
|
|
|
$Bitcoin::Crypto::Role::Network::VERSION = '2.00001'; |
4
|
29
|
|
|
29
|
|
16972
|
use v5.10; |
|
29
|
|
|
|
|
125
|
|
5
|
29
|
|
|
29
|
|
195
|
use strict; |
|
29
|
|
|
|
|
75
|
|
|
29
|
|
|
|
|
635
|
|
6
|
29
|
|
|
29
|
|
157
|
use warnings; |
|
29
|
|
|
|
|
85
|
|
|
29
|
|
|
|
|
914
|
|
7
|
29
|
|
|
29
|
|
192
|
use Scalar::Util qw(blessed); |
|
29
|
|
|
|
|
104
|
|
|
29
|
|
|
|
|
1926
|
|
8
|
29
|
|
|
29
|
|
2229
|
use Mooish::AttributeBuilder -standard; |
|
29
|
|
|
|
|
105
|
|
|
29
|
|
|
|
|
224
|
|
9
|
|
|
|
|
|
|
|
10
|
29
|
|
|
29
|
|
3886
|
use Bitcoin::Crypto::Types qw(InstanceOf Str); |
|
29
|
|
|
|
|
89
|
|
|
29
|
|
|
|
|
265
|
|
11
|
29
|
|
|
29
|
|
88128
|
use Bitcoin::Crypto::Network; |
|
29
|
|
|
|
|
1938
|
|
|
29
|
|
|
|
|
1043
|
|
12
|
29
|
|
|
29
|
|
218
|
use Bitcoin::Crypto::Exception; |
|
29
|
|
|
|
|
112
|
|
|
29
|
|
|
|
|
661
|
|
13
|
29
|
|
|
29
|
|
167
|
use Moo::Role; |
|
29
|
|
|
|
|
118
|
|
|
29
|
|
|
|
|
318
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has param 'network' => ( |
16
|
|
|
|
|
|
|
coerce => (InstanceOf ['Bitcoin::Crypto::Network']) |
17
|
|
|
|
|
|
|
->plus_coercions(Str, q{Bitcoin::Crypto::Network->get($_)}), |
18
|
|
|
|
|
|
|
default => sub { |
19
|
|
|
|
|
|
|
return Bitcoin::Crypto::Network->get; |
20
|
|
|
|
|
|
|
}, |
21
|
|
|
|
|
|
|
writer => -hidden, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# make writer chainable |
25
|
|
|
|
|
|
|
sub set_network |
26
|
|
|
|
|
|
|
{ |
27
|
90
|
|
|
90
|
0
|
12402
|
my ($self, $network) = @_; |
28
|
90
|
|
|
|
|
2003
|
$self->_set_network($network); |
29
|
90
|
|
|
|
|
3969
|
return $self; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|