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