| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Mew; |
|
2
|
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
181188
|
use strictures 2; |
|
|
2
|
|
|
|
|
2276
|
|
|
|
2
|
|
|
|
|
57
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.002001'; # VERSION |
|
6
|
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
983
|
use Import::Into; |
|
|
2
|
|
|
|
|
3843
|
|
|
|
2
|
|
|
|
|
43
|
|
|
8
|
2
|
|
|
2
|
|
760
|
use Moo; |
|
|
2
|
|
|
|
|
15512
|
|
|
|
2
|
|
|
|
|
8
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub import { |
|
11
|
2
|
|
|
2
|
|
12
|
my $class = shift; |
|
12
|
2
|
|
|
|
|
11
|
strictures->import::into(1); |
|
13
|
2
|
|
|
|
|
600
|
Moo->import::into(1); |
|
14
|
2
|
|
|
|
|
596
|
MooX->import::into(1, $_) for @_; |
|
15
|
2
|
|
|
|
|
8
|
MooX::ChainedAttributes->import::into(1); |
|
16
|
2
|
|
|
|
|
42355
|
Types::Standard->import::into(1, qw/:all/); |
|
17
|
2
|
|
|
|
|
204502
|
Types::Common::Numeric->import::into(1, qw/:all/); |
|
18
|
|
|
|
|
|
|
|
|
19
|
2
|
|
|
|
|
29618
|
my $target = caller; |
|
20
|
2
|
|
|
|
|
35
|
my $moo_has = $target->can('has'); |
|
21
|
|
|
|
|
|
|
Moo::_install_tracked $target => has => sub { |
|
22
|
16
|
|
|
16
|
|
42821
|
my $name_proto = shift; |
|
23
|
16
|
100
|
|
|
|
61
|
my @name_proto = ref $name_proto eq 'ARRAY' |
|
24
|
|
|
|
|
|
|
? @$name_proto : $name_proto; |
|
25
|
|
|
|
|
|
|
|
|
26
|
16
|
|
|
|
|
26
|
my $req = 1; |
|
27
|
16
|
|
|
|
|
22
|
my $mew_type; |
|
28
|
16
|
100
|
|
|
|
45
|
$mew_type = shift if @_ % 2 != 0; |
|
29
|
16
|
100
|
100
|
|
|
110
|
if ($mew_type and $mew_type->is_parameterized and $mew_type->parent == Types::Standard::Optional()) { |
|
|
|
50
|
66
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
30
|
4
|
|
|
|
|
329
|
$req = 0; |
|
31
|
4
|
|
|
|
|
14
|
$mew_type = $mew_type->type_parameter; |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
elsif ($mew_type and $mew_type == Types::Standard::Optional()) { |
|
34
|
0
|
|
|
|
|
0
|
$req = 0; |
|
35
|
0
|
|
|
|
|
0
|
$mew_type = Types::Standard::Any(); |
|
36
|
|
|
|
|
|
|
} |
|
37
|
16
|
|
|
|
|
2957
|
for my $attr ( @name_proto ) { |
|
38
|
18
|
|
|
|
|
708
|
my %spec = @_; |
|
39
|
18
|
100
|
|
|
|
54
|
if ( $mew_type ) { |
|
40
|
16
|
|
|
|
|
87
|
my %mew_spec; |
|
41
|
16
|
100
|
|
|
|
60
|
$mew_spec{required} = $req unless $attr =~ s/^-//; |
|
42
|
|
|
|
|
|
|
( $mew_spec{init_arg} = $attr ) =~ s/^_// |
|
43
|
16
|
100
|
|
|
|
78
|
unless exists $spec{init_arg}; |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
%spec = ( |
|
46
|
16
|
100
|
|
|
|
124
|
is => $spec{chained} ? 'rw' : 'ro' , |
|
47
|
|
|
|
|
|
|
isa => $mew_type, |
|
48
|
|
|
|
|
|
|
%mew_spec, |
|
49
|
|
|
|
|
|
|
%spec, |
|
50
|
|
|
|
|
|
|
); |
|
51
|
|
|
|
|
|
|
} |
|
52
|
18
|
|
|
|
|
67
|
$moo_has->( $attr => %spec ); |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
16
|
|
|
|
|
23540
|
return; |
|
56
|
2
|
|
|
|
|
19
|
}; |
|
57
|
|
|
|
|
|
|
|
|
58
|
2
|
|
|
|
|
72
|
namespace::clean->import::into(1); |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
q| |
|
62
|
|
|
|
|
|
|
To err is human -- and to blame it on a computer is even more so |
|
63
|
|
|
|
|
|
|
|; |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |