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

filter: Statementstmt 66.6% 12 / 18 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod n/a totaltotal 50.0% 14 / 28 CC 4 SCAR 24.7
CC
4
Cov
50%
__ANON__
20.0
__ANON__
1.1
BEGIN
1.0
CRAP 11.9
« lib/Reaction/UI/Widget/URI.pm ↑ Summary lib/Reaction/UI/ViewPort/Collection/Role/Order.pm »
1 package Reaction::UI::ViewPort::Field::Mutable::Array;
2  
3 4 ▶use Reaction::Class;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 4 ▶use namespace::clean -except => [ qw(meta) ];
Subroutine BEGIN: called CC=1 SCAR=0.0
6 4 extends 'Reaction::UI::ViewPort::Field::Array';
7  
8 4 with 'Reaction::UI::ViewPort::Field::Role::Mutable';
9  
10 0 ▶around value => sub {
Subroutine __ANON__: not called CC=4 SCAR=30.0
11 0 my $orig = shift;
12 0 my $self = shift;
13 0 ▶ return $orig->($self) unless @_;
Branch: 1 branch
BranchTrueFalseTotal
unless @_ 0 0 0
14 0 ▶ my $value = defined $_[0] ? $_[0] : [];
Branch: 1 branch
BranchTrueFalseTotal
defined $_[0] ? : 0 0 0
15 0 ▶ $orig->($self, (ref $value eq 'ARRAY' ? $value : [ $value ]));
Branch: 1 branch
BranchTrueFalseTotal
ref $value eq 'ARRAY' ? : 0 0 0
16 4 };
17  
18 # value_string doesn't make sense in an Array field
19 0 ▶override _value_string_from_value => sub { shift->_empty_string_value };
Subroutine __ANON__: not called CC=1 SCAR=1.2
20  
21 4 __PACKAGE__->meta->make_immutable;
22  
23 4 1;
24  
« lib/Reaction/UI/Widget/URI.pm ↑ Summary lib/Reaction/UI/ViewPort/Collection/Role/Order.pm »