File Coverage

blib/lib/HTML/FormHandler/Model/Object.pm
Criterion Covered Total %
statement 6 13 46.1
branch 0 4 0.0
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 21 38.1


line stmt bran cond sub pod time code
1             package HTML::FormHandler::Model::Object;
2             # ABSTRACT: stub for Object model
3             $HTML::FormHandler::Model::Object::VERSION = '0.40067';
4 1     1   3190 use Moose::Role;
  1         1  
  1         8  
5              
6             sub update_model {
7 0     0 0   my $self = shift;
8              
9 0           my $item = $self->item;
10 0 0         return unless $item;
11 0           foreach my $field ( $self->all_fields ) {
12 0           my $name = $field->name;
13 0 0         next unless $item->can($name);
14 0           $item->$name( $field->value );
15             }
16             }
17              
18 1     1   3947 use namespace::autoclean;
  1         3  
  1         9  
19             1;
20              
21             __END__
22              
23             =pod
24              
25             =encoding UTF-8
26              
27             =head1 NAME
28              
29             HTML::FormHandler::Model::Object - stub for Object model
30              
31             =head1 VERSION
32              
33             version 0.40067
34              
35             =head1 AUTHOR
36              
37             FormHandler Contributors - see HTML::FormHandler
38              
39             =head1 COPYRIGHT AND LICENSE
40              
41             This software is copyright (c) 2016 by Gerda Shank.
42              
43             This is free software; you can redistribute it and/or modify it under
44             the same terms as the Perl 5 programming language system itself.
45              
46             =cut