line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mouse::Meta::Method; |
2
|
115
|
|
|
115
|
|
34610
|
use Mouse::Util qw(:meta); # enables strict and warnings |
|
115
|
|
|
|
|
166
|
|
|
115
|
|
|
|
|
525
|
|
3
|
115
|
|
|
115
|
|
459
|
use Scalar::Util (); |
|
115
|
|
|
|
|
137
|
|
|
115
|
|
|
|
|
4608
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
|
|
|
|
|
|
'==' => '_equal', |
7
|
|
|
|
|
|
|
'eq' => '_equal', |
8
|
2
|
|
|
2
|
|
7
|
'&{}' => sub{ $_[0]->body }, |
9
|
115
|
|
|
|
|
811
|
fallback => 1, |
10
|
115
|
|
|
115
|
|
92953
|
; |
|
115
|
|
|
|
|
72250
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub wrap { |
13
|
64
|
|
|
64
|
0
|
65
|
my $class = shift; |
14
|
64
|
50
|
|
|
|
152
|
unshift @_, 'body' if @_ % 2 != 0; |
15
|
64
|
|
|
|
|
115
|
return $class->_new(@_); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub _new{ |
19
|
56
|
|
|
56
|
|
155
|
my($class, %args) = @_; |
20
|
56
|
|
|
|
|
70
|
my $self = bless \%args, $class; |
21
|
|
|
|
|
|
|
|
22
|
56
|
100
|
|
|
|
99
|
if($class ne __PACKAGE__){ |
23
|
5
|
|
|
|
|
12
|
$self->meta->_initialize_object($self, \%args); |
24
|
|
|
|
|
|
|
} |
25
|
56
|
|
|
|
|
137
|
return $self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
17
|
|
|
17
|
0
|
103
|
sub body { $_[0]->{body} } |
29
|
24
|
|
|
24
|
0
|
379
|
sub name { $_[0]->{name} } |
30
|
42
|
|
|
42
|
0
|
120
|
sub package_name { $_[0]->{package} } |
31
|
2
|
|
|
2
|
0
|
24
|
sub associated_metaclass { $_[0]->{associated_metaclass} } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub fully_qualified_name { |
34
|
12
|
|
|
12
|
0
|
16
|
my($self) = @_; |
35
|
12
|
|
|
|
|
12
|
return $self->package_name . '::' . $self->name; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# for Moose compat |
39
|
|
|
|
|
|
|
sub _equal { |
40
|
1
|
|
|
1
|
|
70
|
my($l, $r) = @_; |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
33
|
|
|
6
|
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__ |