line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
2052
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
95
|
|
2
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
99
|
|
3
|
|
|
|
|
|
|
package Search::GIN::Extract::Class; |
4
|
|
|
|
|
|
|
our $VERSION = '0.10'; |
5
|
2
|
|
|
2
|
|
9
|
use Moose; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
12
|
|
6
|
2
|
|
|
2
|
|
9853
|
use MRO::Compat; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
36
|
|
7
|
2
|
|
|
2
|
|
8
|
use namespace::autoclean; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
17
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with qw( |
10
|
|
|
|
|
|
|
Search::GIN::Extract |
11
|
|
|
|
|
|
|
Search::GIN::Keys::Deep |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub extract_values { |
15
|
5
|
|
|
5
|
0
|
11
|
my ( $self, $obj, @args ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
5
|
|
|
|
|
8
|
my $class = ref $obj; |
18
|
|
|
|
|
|
|
|
19
|
5
|
|
|
|
|
20
|
my $isa = $class->mro::get_linear_isa(); |
20
|
|
|
|
|
|
|
|
21
|
5
|
|
|
|
|
14
|
my $meta = Class::MOP::get_metaclass_by_name($class); |
22
|
5
|
50
|
33
|
|
|
48
|
my @roles = $meta && $meta->can("calculate_all_roles") ? ( map { $_->name } $meta->calculate_all_roles ) : (); |
|
0
|
|
|
|
|
0
|
|
23
|
|
|
|
|
|
|
|
24
|
5
|
|
|
|
|
206
|
return $self->process_keys({ |
25
|
|
|
|
|
|
|
blessed => $class, |
26
|
|
|
|
|
|
|
class => $isa, |
27
|
|
|
|
|
|
|
does => \@roles, |
28
|
|
|
|
|
|
|
}); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |