line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
10583
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
71
|
|
2
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
117
|
|
3
|
|
|
|
|
|
|
package Search::GIN::Extract::Class; |
4
|
|
|
|
|
|
|
BEGIN { |
5
|
2
|
|
|
2
|
|
52
|
$Search::GIN::Extract::Class::AUTHORITY = 'cpan:NUFFIN'; |
6
|
|
|
|
|
|
|
} |
7
|
|
|
|
|
|
|
# ABSTRACT: |
8
|
|
|
|
|
|
|
$Search::GIN::Extract::Class::VERSION = '0.09'; |
9
|
2
|
|
|
2
|
|
1232
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use MRO::Compat; |
11
|
|
|
|
|
|
|
use namespace::clean -except => 'meta'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
with qw( |
14
|
|
|
|
|
|
|
Search::GIN::Extract |
15
|
|
|
|
|
|
|
Search::GIN::Keys::Deep |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub extract_values { |
19
|
|
|
|
|
|
|
my ( $self, $obj, @args ) = @_; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
my $class = ref $obj; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $isa = $class->mro::get_linear_isa(); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my $meta = Class::MOP::get_metaclass_by_name($class); |
26
|
|
|
|
|
|
|
my @roles = $meta && $meta->can("calculate_all_roles") ? ( map { $_->name } $meta->calculate_all_roles ) : (); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
return $self->process_keys({ |
29
|
|
|
|
|
|
|
blessed => $class, |
30
|
|
|
|
|
|
|
class => $isa, |
31
|
|
|
|
|
|
|
does => \@roles, |
32
|
|
|
|
|
|
|
}); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=pod |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding UTF-8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Search::GIN::Extract::Class - $Search::GIN::Extract::Class::VERSION = '0.09'; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 VERSION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
version 0.09 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SYNOPSIS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
use Search::GIN::Extract::Class; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 DESCRIPTION |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
×××× ×§××'×× (Yuval Kogman) <nothingmuch@woobling.org> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This software is copyright (c) 2008 by ×××× ×§××'×× (Yuval Kogman), Infinity Interactive. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
66
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |