line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mouse::Meta::Method; |
2
|
115
|
|
|
115
|
|
44545
|
use Mouse::Util qw(:meta); # enables strict and warnings |
|
115
|
|
|
|
|
300
|
|
|
115
|
|
|
|
|
806
|
|
3
|
115
|
|
|
115
|
|
774
|
use Scalar::Util (); |
|
115
|
|
|
|
|
286
|
|
|
115
|
|
|
|
|
6443
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
|
|
|
|
|
|
'==' => '_equal', |
7
|
|
|
|
|
|
|
'eq' => '_equal', |
8
|
2
|
|
|
2
|
|
12
|
'&{}' => sub{ $_[0]->body }, |
9
|
115
|
|
|
|
|
1236
|
fallback => 1, |
10
|
115
|
|
|
115
|
|
124390
|
; |
|
115
|
|
|
|
|
107288
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub wrap { |
13
|
64
|
|
|
64
|
0
|
137
|
my $class = shift; |
14
|
64
|
50
|
|
|
|
224
|
unshift @_, 'body' if @_ % 2 != 0; |
15
|
64
|
|
|
|
|
204
|
return $class->_new(@_); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub _new{ |
19
|
56
|
|
|
56
|
|
265
|
my($class, %args) = @_; |
20
|
56
|
|
|
|
|
132
|
my $self = bless \%args, $class; |
21
|
|
|
|
|
|
|
|
22
|
56
|
100
|
|
|
|
172
|
if($class ne __PACKAGE__){ |
23
|
5
|
|
|
|
|
19
|
$self->meta->_initialize_object($self, \%args); |
24
|
|
|
|
|
|
|
} |
25
|
56
|
|
|
|
|
248
|
return $self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
17
|
|
|
17
|
0
|
140
|
sub body { $_[0]->{body} } |
29
|
24
|
|
|
24
|
0
|
495
|
sub name { $_[0]->{name} } |
30
|
42
|
|
|
42
|
0
|
172
|
sub package_name { $_[0]->{package} } |
31
|
2
|
|
|
2
|
0
|
27
|
sub associated_metaclass { $_[0]->{associated_metaclass} } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub fully_qualified_name { |
34
|
12
|
|
|
12
|
0
|
31
|
my($self) = @_; |
35
|
12
|
|
|
|
|
21
|
return $self->package_name . '::' . $self->name; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# for Moose compat |
39
|
|
|
|
|
|
|
sub _equal { |
40
|
1
|
|
|
1
|
|
89
|
my($l, $r) = @_; |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
33
|
|
|
7
|
return Scalar::Util::blessed($r) |
43
|
|
|
|
|
|
|
&& $l->body == $r->body |
44
|
|
|
|
|
|
|
&& $l->name eq $r->name |
45
|
|
|
|
|
|
|
&& $l->package_name eq $r->package_name; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
__END__ |