line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
{ |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package Sub::HandlesVia::Toolkit::ObjectPad; |
4
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
6
|
1
|
|
|
1
|
|
5
|
no warnings qw( once void ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
159
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
9
|
|
|
|
|
|
|
our $MITE_SHIM = "Sub::HandlesVia::Mite"; |
10
|
|
|
|
|
|
|
our $MITE_VERSION = "0.012000"; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Mite keywords |
13
|
|
|
|
|
|
|
BEGIN { |
14
|
1
|
|
|
1
|
|
5
|
my ( $SHIM, $CALLER ) = |
15
|
|
|
|
|
|
|
( "Sub::HandlesVia::Mite", "Sub::HandlesVia::Toolkit::ObjectPad" ); |
16
|
|
|
|
|
|
|
( |
17
|
|
|
|
|
|
|
*after, *around, *before, *extends, *field, |
18
|
|
|
|
|
|
|
*has, *param, *signature_for, *with |
19
|
|
|
|
|
|
|
) |
20
|
1
|
|
|
|
|
2
|
= do { |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
package Sub::HandlesVia::Mite; |
23
|
1
|
|
|
1
|
|
7
|
no warnings 'redefine'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
229
|
|
24
|
|
|
|
|
|
|
( |
25
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
26
|
1
|
|
|
|
|
10
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
27
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, |
28
|
|
|
|
|
|
|
sub { }, |
29
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_has( $CALLER, field => @_ ) }, |
30
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, |
31
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_has( $CALLER, param => @_ ) }, |
32
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, |
33
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
34
|
1
|
|
|
|
|
207
|
); |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Mite imports |
39
|
|
|
|
|
|
|
BEGIN { |
40
|
1
|
|
|
1
|
|
7
|
require Scalar::Util; |
41
|
1
|
|
|
|
|
4
|
*STRICT = \&Sub::HandlesVia::Mite::STRICT; |
42
|
1
|
|
|
|
|
10
|
*bare = \&Sub::HandlesVia::Mite::bare; |
43
|
1
|
|
|
|
|
3
|
*blessed = \&Scalar::Util::blessed; |
44
|
1
|
|
|
|
|
2
|
*carp = \&Sub::HandlesVia::Mite::carp; |
45
|
1
|
|
|
|
|
2
|
*confess = \&Sub::HandlesVia::Mite::confess; |
46
|
1
|
|
|
|
|
2
|
*croak = \&Sub::HandlesVia::Mite::croak; |
47
|
1
|
|
|
|
|
1
|
*false = \&Sub::HandlesVia::Mite::false; |
48
|
1
|
|
|
|
|
2
|
*guard = \&Sub::HandlesVia::Mite::guard; |
49
|
1
|
|
|
|
|
2
|
*lazy = \&Sub::HandlesVia::Mite::lazy; |
50
|
1
|
|
|
|
|
2
|
*lock = \&Sub::HandlesVia::Mite::lock; |
51
|
1
|
|
|
|
|
2
|
*ro = \&Sub::HandlesVia::Mite::ro; |
52
|
1
|
|
|
|
|
2
|
*rw = \&Sub::HandlesVia::Mite::rw; |
53
|
1
|
|
|
|
|
2
|
*rwp = \&Sub::HandlesVia::Mite::rwp; |
54
|
1
|
|
|
|
|
2
|
*true = \&Sub::HandlesVia::Mite::true; |
55
|
1
|
|
|
|
|
48
|
*unlock = \&Sub::HandlesVia::Mite::unlock; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
BEGIN { |
59
|
1
|
|
|
1
|
|
496
|
require Sub::HandlesVia::Toolkit; |
60
|
|
|
|
|
|
|
|
61
|
1
|
|
|
1
|
|
6
|
use mro 'c3'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
62
|
1
|
|
|
|
|
4
|
our @ISA; |
63
|
1
|
|
|
|
|
231
|
push @ISA, "Sub::HandlesVia::Toolkit"; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
# See UNIVERSAL |
67
|
|
|
|
|
|
|
sub DOES { |
68
|
24
|
|
|
24
|
0
|
44
|
my ( $self, $role ) = @_; |
69
|
24
|
|
|
|
|
31
|
our %DOES; |
70
|
24
|
50
|
|
|
|
50
|
return $DOES{$role} if exists $DOES{$role}; |
71
|
24
|
50
|
|
|
|
44
|
return 1 if $role eq __PACKAGE__; |
72
|
24
|
50
|
0
|
|
|
50
|
if ( $INC{'Moose/Util.pm'} |
|
|
|
33
|
|
|
|
|
73
|
|
|
|
|
|
|
and my $meta = Moose::Util::find_meta( ref $self or $self ) ) |
74
|
|
|
|
|
|
|
{ |
75
|
0
|
0
|
0
|
|
|
0
|
$meta->can('does_role') and $meta->does_role($role) and return 1; |
76
|
|
|
|
|
|
|
} |
77
|
24
|
|
|
|
|
55
|
return $self->SUPER::DOES($role); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
# Alias for Moose/Moo-compatibility |
81
|
|
|
|
|
|
|
sub does { |
82
|
24
|
|
|
24
|
0
|
824
|
shift->DOES(@_); |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
1; |
86
|
|
|
|
|
|
|
} |