line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MooX::Override; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
55720
|
use 5.008; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
5
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
6
|
1
|
|
|
1
|
|
5
|
no warnings qw( once void uninitialized ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
53
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
BEGIN { |
9
|
1
|
|
|
1
|
|
2
|
$MooX::Override::AUTHORITY = 'cpan:TOBYINK'; |
10
|
1
|
|
|
|
|
305
|
$MooX::Override::VERSION = '0.002'; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub import |
14
|
|
|
|
|
|
|
{ |
15
|
4
|
|
|
|
|
16
|
goto &_import_class |
16
|
2
|
50
|
|
2
|
|
645
|
if grep { $_ eq '-class' } @_; |
17
|
4
|
|
|
|
|
15
|
goto &_import_role |
18
|
2
|
50
|
|
|
|
4
|
if grep { $_ eq '-role' } @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
0
|
require Carp; |
21
|
0
|
|
|
|
|
0
|
Carp::confess("MooX::Override requires an indication of -class or -role; stopped"); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _import_class |
25
|
|
|
|
|
|
|
{ |
26
|
0
|
|
|
0
|
|
0
|
my $target = caller; |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
0
|
foreach my $fun (qw( override super )) |
29
|
|
|
|
|
|
|
{ |
30
|
|
|
|
|
|
|
Moo::_install_tracked( |
31
|
|
|
|
|
|
|
$target, |
32
|
|
|
|
|
|
|
$fun, |
33
|
|
|
|
|
|
|
sub { |
34
|
0
|
|
|
0
|
|
0
|
require Class::Method::ModifiersX::Override; |
35
|
0
|
|
|
|
|
0
|
my $orig = Class::Method::ModifiersX::Override->can($fun); |
36
|
0
|
|
|
|
|
0
|
goto $orig; |
37
|
|
|
|
|
|
|
}, |
38
|
0
|
|
|
|
|
0
|
); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub _import_role |
43
|
|
|
|
|
|
|
{ |
44
|
2
|
|
|
2
|
|
4
|
my $target = caller; |
45
|
2
|
|
|
|
|
4
|
my $INFO = \%Role::Tiny::INFO; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Moo::Role::_install_tracked( |
48
|
|
|
|
|
|
|
$target, |
49
|
|
|
|
|
|
|
'override', |
50
|
|
|
|
|
|
|
sub { |
51
|
2
|
|
|
2
|
|
876
|
require Class::Method::ModifiersX::Override; |
52
|
2
|
|
|
|
|
10
|
my $sub = Class::Method::ModifiersX::Override::_mk_around($target, pop); |
53
|
2
|
|
|
|
|
3
|
push @{ $INFO->{$target}{modifiers} }, [ around => @_, $sub ]; |
|
2
|
|
|
|
|
13
|
|
54
|
2
|
|
|
|
|
35
|
'Moo::Role'->_maybe_reset_handlemoose($target); |
55
|
|
|
|
|
|
|
}, |
56
|
2
|
|
|
|
|
11
|
); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
Moo::_install_tracked( |
59
|
|
|
|
|
|
|
$target, |
60
|
|
|
|
|
|
|
'super', |
61
|
|
|
|
|
|
|
sub { |
62
|
0
|
|
|
0
|
|
|
require Class::Method::ModifiersX::Override; |
63
|
0
|
|
|
|
|
|
my $orig = 'Class::Method::ModifiersX::Override'->can('super'); |
64
|
0
|
|
|
|
|
|
goto $orig; |
65
|
|
|
|
|
|
|
}, |
66
|
2
|
|
|
|
|
64
|
); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__END__ |