MuForm/Model/Object.pm

filter: Statementstmt 36.3% 4 / 11 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 1 / 2 Podpod 0.0% 0 / 1 totaltotal 27.7% 5 / 18 SCAR 23.3
CC
4
Cov
27%
update_model
20.0
BEGIN
1.0
CRAP 10.3
« MuForm/Field/Multiple.pm ↑ Summary MuForm/Types.pm »
1 package Data::MuForm::Model::Object;
2 # ABSTRACT: stub for Object model
3  
4 1 ▶use Moo::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub update_model {
7 0 ▶ my $self = shift;
Subroutine update_model: not called CC=4 SCAR=30.0
Pod undocumented
8  
9 0 my $model = $self->model;
10 0 ▶ return unless $model;
Branch: 1 branch
BranchTrueFalseTotal
unless $model 0 0 0
11 0 foreach my $field ( $self->sorted_fields ) {
12 0 my $name = $field->name;
13 0 ▶ next unless $model->can($name);
Branch: 1 branch
BranchTrueFalseTotal
unless $model->can($name) 0 0 0
14 0 $model->$name( $field->value );
15 }
16 }
17  
18 1 1;
19  
20 __END__
21  
22 =pod
23  
24 =encoding UTF-8
25  
26 =head1 NAME
27  
28 Data::MuForm::Model::Object - stub for Object model
29  
30 =head1 VERSION
31  
32 version 0.04
33  
34 =head1 AUTHOR
35  
36 Gerda Shank
37  
38 =head1 COPYRIGHT AND LICENSE
39  
40 This software is copyright (c) 2017 by Gerda Shank.
41  
42 This is free software; you can redistribute it and/or modify it under
43 the same terms as the Perl 5 programming language system itself.
44  
45 =cut
« MuForm/Field/Multiple.pm ↑ Summary MuForm/Types.pm »