lib/ComponentUI/TestModel/Foo/SearchSpec.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod n/a totaltotal 53.3% 16 / 30 CC 3 SCAR 16.8
CC
3
Cov
54%
_build__search_spec
12.0
_to_string_pack_value
2.0
_from_string_unpack_value
2.0
CRAP 5.4
« lib/Reaction/UI/ViewPort/Field/Mutable/HiddenArray.pm ↑ Summary lib/Reaction/UI/ViewPort/Action/Role/Apply.pm »
1 package ComponentUI::TestModel::Foo::SearchSpec;
2 3 ▶use Reaction::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 3 ▶use MooseX::Types::Common::String qw/NonEmptySimpleStr/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 with 'Reaction::InterfaceModel::Search::Spec';
8  
9 3 has 'first_name' => (isa => NonEmptySimpleStr, is => 'rw', required => 0);
10 3 has 'last_name' => (isa => NonEmptySimpleStr, is => 'rw', required => 0);
11  
12 0 ▶sub _build__search_spec {
Subroutine _build__search_spec: not called CC=3 SCAR=24.8
13 0 my($self) = @_;
14 0 my %search;
15 0 ▶ $search{first_name} = $self->first_name if $self->has_first_name;
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_first_name 0 0 0
16 0 ▶ $search{last_name} = $self->last_name if $self->has_last_name;
Branch: 1 branch
BranchTrueFalseTotal
if $self->has_last_name 0 0 0
17 0 return [\%search];
18 }
19  
20 # no special packing/unpacking required for Foo
21 0 ▶sub _to_string_pack_value { $_[1] }
Subroutine _to_string_pack_value: not called CC=1 SCAR=6.9
22 0 ▶sub _from_string_unpack_value { $_[1] }
Subroutine _from_string_unpack_value: not called CC=1 SCAR=6.9
23  
24 3 1;
« lib/Reaction/UI/ViewPort/Field/Mutable/HiddenArray.pm ↑ Summary lib/Reaction/UI/ViewPort/Action/Role/Apply.pm »