File Coverage

blib/lib/Data/MuForm/Model.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 6 8 75.0
pod 0 7 0.0
total 13 22 59.0


line stmt bran cond sub pod time code
1             package Data::MuForm::Model;
2             # ABSTRACT: Base Model role
3              
4 82     82   424490 use Moo::Role;
  82         119  
  82         511  
5              
6             has 'model' => (
7             is => 'rw',
8             lazy => 1,
9             builder => 'build_model',
10             clearer => 'clear_model',
11             trigger => sub { shift->set_model(@_) }
12             );
13 132     132 0 33148 sub build_model { return }
14              
15             sub set_model {
16 82     82 0 108 my ( $self, $model ) = @_;
17 82         1348 $self->model_class( ref $model );
18             }
19              
20             has 'model_id' => (
21             is => 'rw',
22             clearer => 'clear_model_id',
23             trigger => sub { shift->set_model_id(@_) }
24             );
25              
26       2 0   sub set_model_id { }
27              
28             has 'model_class' => (
29             # isa => 'Str',
30             is => 'rw',
31             );
32              
33 9     9 0 252 sub use_model_for_defaults {1}
34              
35       0 0   sub validate_model { }
36              
37       0 0   sub update_model { }
38              
39       15 0   sub lookup_options { }
40              
41             1;
42              
43             __END__
44              
45             =pod
46              
47             =encoding UTF-8
48              
49             =head1 NAME
50              
51             Data::MuForm::Model - Base Model role
52              
53             =head1 VERSION
54              
55             version 0.04
56              
57             =head1 AUTHOR
58              
59             Gerda Shank
60              
61             =head1 COPYRIGHT AND LICENSE
62              
63             This software is copyright (c) 2017 by Gerda Shank.
64              
65             This is free software; you can redistribute it and/or modify it under
66             the same terms as the Perl 5 programming language system itself.
67              
68             =cut