GIN/Extract/Class.pm

filter: Statementstmt 96.1% 25 / 26 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 82.5% 33 / 40 CC 3 SCAR 6.3
CC
3
Cov
87%
extract_values
3.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« GIN/Keys/Expand.pm ↑ Summary GIN/Extract/Attributes.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 package Search::GIN::Extract::Class;
4  
5 2 our $VERSION = '0.11';
6  
7 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use MRO::Compat;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 with qw(
12 Search::GIN::Extract
13 Search::GIN::Keys::Deep
14 );
15  
16 5 ▶sub extract_values {
Subroutine extract_values: called CC=3 SCAR=12.0
Pod undocumented
17 5 my ( $self, $obj, @args ) = @_;
18  
19 5 my $class = ref $obj;
20  
21 5 my $isa = $class->mro::get_linear_isa();
22  
23 5 my $meta = Class::MOP::get_metaclass_by_name($class);
24 0 ▶ my @roles = $meta && $meta->can("calculate_all_roles") ? ( map { $_->name } $meta->calculate_all_roles ) : ();
Branch: 1 branch
BranchTrueFalseTotal
$meta && $meta->can('calculate_all_roles') ? : 5 0 5
Condition33%1/3
$meta and $meta->can("calculate_all_roles")
!ll&&!rl&&r
005
MC/DC0%0/2
$meta and $meta->can("calculate_all_roles")
$meta $meta->can("calculate_all_roles")
Truth table33%1/3
A and B
A= $metaB= $meta->can("calculate_all_roles")
ABresult
0X0
100
111
25  
26 5 return $self->process_keys({
27 blessed => $class,
28 class => $isa,
29 does => \@roles,
30 });
31 }
32  
33 2 __PACKAGE__->meta->make_immutable;
34  
35 2 1;
« GIN/Keys/Expand.pm ↑ Summary GIN/Extract/Attributes.pm »