lib/Reaction/UI/ViewPort/Field/Mutable/HiddenArray.pm

filter: Statementstmt 66.6% 14 / 21 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod n/a totaltotal 56.6% 17 / 30 CC 3 SCAR 17.7
CC
3
Cov
56%
__ANON__
12.0
_empty_value
2.0
BEGIN
1.0
CRAP 5.9
« lib/Reaction/InterfaceModel/Collection.pm ↑ Summary lib/ComponentUI/TestModel/Foo/SearchSpec.pm »
1 package Reaction::UI::ViewPort::Field::Mutable::HiddenArray;
2  
3 1 ▶use Reaction::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use namespace::clean -except => [ qw(meta) ];
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use MooseX::Types::Moose qw/ArrayRef/;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 extends 'Reaction::UI::ViewPort::Field';
8  
9 1 with 'Reaction::UI::ViewPort::Field::Role::Mutable' => { value_type => 'ArrayRef' };
10  
11 #has '+value' => (isa => ArrayRef);
12  
13 0 ▶around value => sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
14 0 my $orig = shift;
15 0 my $self = shift;
16 0 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 0 0 0
17 #this hsould be done with coercions
18 0 ▶ $orig->($self, (ref $_[0] eq 'ARRAY' ? $_[0] : [ $_[0] ]));
Branch: 1 branch
BranchTrueFalseTotal
ref $_[0] eq 'ARRAY' ? : 0 0 0
19 0 $self->sync_to_action;
20 } else {
21 0 $orig->($self);
22 }
23 1 };
24 0 ▶sub _empty_value { [] };
Subroutine _empty_value: not called CC=1 SCAR=6.9
25 1 __PACKAGE__->meta->make_immutable;
26  
27  
28 1 1;
29  
30 =head1 NAME
31  
32 Reaction::UI::ViewPort::Field::Mutable::HiddenArray
33  
34 =head1 DESCRIPTION
35  
36 =head1 SEE ALSO
37  
38 =head2 L<Reaction::UI::ViewPort::Field>
39  
40 =head1 AUTHORS
41  
42 See L<Reaction::Class> for authors.
43  
44 =head1 LICENSE
45  
46 See L<Reaction::Class> for the license.
47  
48 =cut
« lib/Reaction/InterfaceModel/Collection.pm ↑ Summary lib/ComponentUI/TestModel/Foo/SearchSpec.pm »