MuForm/Field/Reset.pm

filter: Statementstmt 93.3% 14 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 25.0% 1 / 4 totaltotal 79.1% 19 / 24 SCAR 0.0
CC
1
Cov
93%
no_fif
2.0
BEGIN
1.0
build_input_type
1.0
CRAP 1.0
« MuForm/Model.pm ↑ Summary MuForm/Field/Hidden.pm »
1 package Data::MuForm::Field::Reset;
2 # ABSTRACT: reset field
3  
4 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 extends 'Data::MuForm::Field';
6  
7  
8 3 has 'value' => ( is => 'rw', default => 'Reset' );
9 3 has '+no_update' => ( default => 1 );
10  
11 2 ▶sub build_input_type { 'reset' }
Subroutine build_input_type: called CC=1 SCAR=0.0
Pod undocumented
12  
13 0 ▶sub no_fif {1}
Subroutine no_fif: not called CC=1 SCAR=6.9
Pod undocumented
14 2 ▶sub fif { shift->value }
Subroutine fif: called CC=1 SCAR=0.0
Pod documented
15  
16 sub base_render_args {
17 2 ▶ my $self = shift;
Subroutine base_render_args: called CC=1 SCAR=0.0
Pod undocumented
18 2 my $args = $self->next::method(@_);
19 2 $args->{layout_type} = 'element';
20 2 $args->{wrapper} = 'none';
21 2 return $args;
22 }
23  
24 3 1;
25  
26 __END__
27  
28 =pod
29  
30 =encoding UTF-8
31  
32 =head1 NAME
33  
34 Data::MuForm::Field::Reset - reset field
35  
36 =head1 VERSION
37  
38 version 0.04
39  
40 =head1 SYNOPSIS
41  
42 Use this field to declare a reset field in your form.
43  
44 has_field 'reset' => ( type => 'Reset', value => 'Restore' );
45  
46 Uses the 'reset' widget.
47  
48 =head1 AUTHOR
49  
50 Gerda Shank
51  
52 =head1 COPYRIGHT AND LICENSE
53  
54 This software is copyright (c) 2017 by Gerda Shank.
55  
56 This is free software; you can redistribute it and/or modify it under
57 the same terms as the Perl 5 programming language system itself.
58  
59 =cut
« MuForm/Model.pm ↑ Summary MuForm/Field/Hidden.pm »