line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mew; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
277016
|
use strictures 2; |
|
3
|
|
|
|
|
3788
|
|
|
3
|
|
|
|
|
84
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.002003'; # VERSION |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
1408
|
use Import::Into; |
|
3
|
|
|
|
|
6008
|
|
|
3
|
|
|
|
|
63
|
|
8
|
3
|
|
|
3
|
|
1155
|
use Moo; |
|
3
|
|
|
|
|
20300
|
|
|
3
|
|
|
|
|
11
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
11
|
3
|
|
|
3
|
|
17
|
my $class = shift; |
12
|
3
|
|
|
|
|
14
|
strictures->import::into(1); |
13
|
3
|
|
|
|
|
671
|
Moo->import::into(1); |
14
|
3
|
|
|
|
|
862
|
MooX->import::into(1, $_) for @_; |
15
|
3
|
|
|
|
|
12
|
MooX::ChainedAttributes->import::into(1); |
16
|
3
|
|
|
|
|
62583
|
Types::Standard->import::into(1, qw/:all/); |
17
|
3
|
|
|
|
|
281505
|
Types::Common::Numeric->import::into(1, qw/:all/); |
18
|
|
|
|
|
|
|
|
19
|
3
|
|
|
|
|
44160
|
my $target = caller; |
20
|
3
|
|
|
|
|
50
|
my $moo_has = $target->can('has'); |
21
|
|
|
|
|
|
|
Moo::_install_tracked $target => has => sub { |
22
|
20
|
|
|
20
|
|
49846
|
my $name_proto = shift; |
23
|
20
|
100
|
|
|
|
57
|
my @name_proto = ref $name_proto eq 'ARRAY' |
24
|
|
|
|
|
|
|
? @$name_proto : $name_proto; |
25
|
|
|
|
|
|
|
|
26
|
20
|
|
|
|
|
25
|
my $req = 1; |
27
|
20
|
|
|
|
|
22
|
my $mew_type; |
28
|
20
|
100
|
|
|
|
53
|
$mew_type = shift if @_ % 2 != 0; |
29
|
20
|
100
|
100
|
|
|
144
|
if ($mew_type and $mew_type->is_parameterized |
|
|
50
|
100
|
|
|
|
|
|
|
|
66
|
|
|
|
|
30
|
|
|
|
|
|
|
and $mew_type->parent->strictly_equals(Types::Standard::Optional())) { |
31
|
4
|
|
|
|
|
250
|
$req = 0; |
32
|
4
|
|
|
|
|
9
|
$mew_type = $mew_type->type_parameter; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
elsif ($mew_type |
35
|
|
|
|
|
|
|
and $mew_type->strictly_equals(Types::Standard::Optional())) { |
36
|
0
|
|
|
|
|
0
|
$req = 0; |
37
|
0
|
|
|
|
|
0
|
$mew_type = Types::Standard::Any(); |
38
|
|
|
|
|
|
|
} |
39
|
20
|
|
|
|
|
971
|
for my $attr ( @name_proto ) { |
40
|
22
|
|
|
|
|
714
|
my %spec = @_; |
41
|
22
|
100
|
|
|
|
50
|
if ( $mew_type ) { |
42
|
20
|
|
|
|
|
86
|
my %mew_spec; |
43
|
20
|
100
|
|
|
|
67
|
$mew_spec{required} = $req unless $attr =~ s/^-//; |
44
|
|
|
|
|
|
|
( $mew_spec{init_arg} = $attr ) =~ s/^_// |
45
|
20
|
100
|
|
|
|
66
|
unless exists $spec{init_arg}; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
%spec = ( |
48
|
20
|
100
|
|
|
|
100
|
is => $spec{chained} ? 'rw' : 'ro' , |
49
|
|
|
|
|
|
|
isa => $mew_type, |
50
|
|
|
|
|
|
|
%mew_spec, |
51
|
|
|
|
|
|
|
%spec, |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
} |
54
|
22
|
|
|
|
|
76
|
$moo_has->( $attr => %spec ); |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
20
|
|
|
|
|
27308
|
return; |
58
|
3
|
|
|
|
|
26
|
}; |
59
|
|
|
|
|
|
|
|
60
|
3
|
|
|
|
|
127
|
namespace::clean->import::into(1); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
q| |
64
|
|
|
|
|
|
|
To err is human -- and to blame it on a computer is even more so |
65
|
|
|
|
|
|
|
|; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
__END__ |