line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormHandler::Field::NoValue; |
2
|
|
|
|
|
|
|
# ABSTRACT: base class for submit field |
3
|
|
|
|
|
|
|
$HTML::FormHandler::Field::NoValue::VERSION = '0.40068'; |
4
|
31
|
|
|
31
|
|
18913
|
use Moose; |
|
31
|
|
|
|
|
80
|
|
|
31
|
|
|
|
|
208
|
|
5
|
|
|
|
|
|
|
extends 'HTML::FormHandler::Field'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has 'html' => ( is => 'rw', isa => 'Str', default => '' ); |
9
|
|
|
|
|
|
|
has 'value' => ( |
10
|
|
|
|
|
|
|
is => 'rw', |
11
|
|
|
|
|
|
|
predicate => 'has_value', |
12
|
|
|
|
|
|
|
clearer => 'clear_value', |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _result_from_fields { |
16
|
69
|
|
|
69
|
|
222
|
my ( $self, $result ) = @_; |
17
|
69
|
|
|
|
|
415
|
my $value = $self->get_default_value; |
18
|
69
|
100
|
|
|
|
263
|
if ( $value ) { |
19
|
1
|
|
|
|
|
32
|
$self->value($value); |
20
|
|
|
|
|
|
|
} |
21
|
69
|
|
|
|
|
2132
|
$self->_set_result($result); |
22
|
69
|
|
|
|
|
2214
|
$result->_set_field_def($self); |
23
|
69
|
|
|
|
|
204
|
return $result; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub _result_from_input { |
27
|
4
|
|
|
4
|
|
21
|
my ( $self, $result, $input, $exists ) = @_; |
28
|
4
|
|
|
|
|
118
|
$self->_set_result($result); |
29
|
4
|
|
|
|
|
152
|
$result->_set_field_def($self); |
30
|
4
|
|
|
|
|
12
|
return $result; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _result_from_object { |
34
|
0
|
|
|
0
|
|
|
my ( $self, $result, $value ) = @_; |
35
|
0
|
|
|
|
|
|
$self->_set_result($result); |
36
|
0
|
|
|
|
|
|
$result->_set_field_def($self); |
37
|
0
|
|
|
|
|
|
return $result; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
7
|
1
|
|
sub fif { } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
has '+widget' => ( default => '' ); |
43
|
|
|
|
|
|
|
has '+noupdate' => ( default => 1 ); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
17
|
1
|
|
sub validate_field { } |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
#sub clear_value { } |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub render { |
50
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
51
|
0
|
|
|
|
|
|
return $self->html; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
55
|
31
|
|
|
31
|
|
208301
|
use namespace::autoclean; |
|
31
|
|
|
|
|
100
|
|
|
31
|
|
|
|
|
305
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=pod |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=encoding UTF-8 |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 NAME |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
HTML::FormHandler::Field::NoValue - base class for submit field |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 VERSION |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
version 0.40068 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 SYNOPSIS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
This is the base class for the Submit & Reset fields. It can be used for fields that |
75
|
|
|
|
|
|
|
do not produce valid 'values'. It should not be used for fields that |
76
|
|
|
|
|
|
|
produce a value or need validating. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
FormHandler Contributors - see HTML::FormHandler |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Gerda Shank. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
87
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=cut |