| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# MooX::Prototype Package Class |
|
2
|
|
|
|
|
|
|
package MooX::Prototype::Package; |
|
3
|
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
11557
|
use Moo; |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
10
|
|
|
5
|
2
|
|
|
2
|
|
1506
|
use Carp; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
117
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
8
|
use Moo::Role (); |
|
|
2
|
|
|
|
|
3
|
|
|
|
2
|
|
|
|
|
81
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '0.02'; # VERSION |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has name => ( |
|
12
|
|
|
|
|
|
|
is => 'ro', |
|
13
|
|
|
|
|
|
|
required => 1 |
|
14
|
|
|
|
|
|
|
); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
{ |
|
17
|
2
|
|
|
2
|
|
11
|
no warnings 'redefine'; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
317
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub after { |
|
20
|
1
|
|
|
1
|
|
1751
|
my $self = shift; |
|
21
|
1
|
|
|
|
|
3
|
my $class = $self->name; |
|
22
|
1
|
|
|
|
|
13
|
$class->can('after')->(@_); |
|
23
|
1
|
|
|
|
|
1782
|
return; |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub around { |
|
27
|
1
|
|
|
1
|
|
7
|
my $self = shift; |
|
28
|
1
|
|
|
|
|
2
|
my $class = $self->name; |
|
29
|
1
|
|
|
|
|
8
|
$class->can('around')->(@_); |
|
30
|
1
|
|
|
|
|
243
|
return; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub before { |
|
34
|
1
|
|
|
1
|
|
7
|
my $self = shift; |
|
35
|
1
|
|
|
|
|
4
|
my $class = $self->name; |
|
36
|
1
|
|
|
|
|
7
|
$class->can('before')->(@_); |
|
37
|
1
|
|
|
|
|
142
|
return; |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub install { |
|
42
|
1
|
|
|
1
|
0
|
2910
|
my $self = shift; |
|
43
|
1
|
50
|
|
|
|
3
|
my $name = shift or croak "Can't make without a name"; |
|
44
|
1
|
50
|
|
|
|
3
|
my $code = shift or croak "Can't make $name without a coderef"; |
|
45
|
1
|
|
|
|
|
4
|
my $class = $self->name; |
|
46
|
|
|
|
|
|
|
|
|
47
|
2
|
|
|
2
|
|
9
|
no strict 'refs'; |
|
|
2
|
|
|
|
|
1
|
|
|
|
2
|
|
|
|
|
110
|
|
|
48
|
2
|
|
|
2
|
|
9
|
no warnings 'redefine'; |
|
|
2
|
|
|
|
|
2
|
|
|
|
2
|
|
|
|
|
305
|
|
|
49
|
1
|
|
|
|
|
1
|
*{"${class}::$name"} = $code; |
|
|
1
|
|
|
|
|
5
|
|
|
50
|
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
2
|
return; |
|
52
|
|
|
|
|
|
|
} |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub include { |
|
55
|
2
|
|
|
2
|
0
|
1551
|
my $self = shift; |
|
56
|
2
|
|
|
|
|
4
|
my %args = @_; |
|
57
|
|
|
|
|
|
|
|
|
58
|
2
|
|
|
|
|
5
|
my $class = $self->name; |
|
59
|
|
|
|
|
|
|
|
|
60
|
2
|
100
|
|
|
|
8
|
if (my $mixin = $args{class}) { |
|
61
|
1
|
|
|
|
|
7
|
Moo->_set_superclasses($class, $mixin); |
|
62
|
1
|
|
|
|
|
107
|
Moo->_maybe_reset_handlemoose($class); |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
|
|
65
|
2
|
100
|
|
|
|
8
|
if (my $role = $args{role}) { |
|
66
|
1
|
|
|
|
|
5
|
Moo::Role->apply_roles_to_package($class, $role); |
|
67
|
1
|
|
|
|
|
654
|
Moo->_maybe_reset_handlemoose($class); |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
|
|
70
|
2
|
|
|
|
|
7
|
return; |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; |