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