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.40067'; |
4
|
30
|
|
|
30
|
|
14156
|
use Moose; |
|
30
|
|
|
|
|
43
|
|
|
30
|
|
|
|
|
153
|
|
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
|
68
|
|
|
68
|
|
118
|
my ( $self, $result ) = @_; |
17
|
68
|
|
|
|
|
316
|
my $value = $self->get_default_value; |
18
|
68
|
100
|
|
|
|
186
|
if ( $value ) { |
19
|
1
|
|
|
|
|
25
|
$self->value($value); |
20
|
|
|
|
|
|
|
} |
21
|
68
|
|
|
|
|
1906
|
$self->_set_result($result); |
22
|
68
|
|
|
|
|
1983
|
$result->_set_field_def($self); |
23
|
68
|
|
|
|
|
138
|
return $result; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub _result_from_input { |
27
|
4
|
|
|
4
|
|
13
|
my ( $self, $result, $input, $exists ) = @_; |
28
|
4
|
|
|
|
|
107
|
$self->_set_result($result); |
29
|
4
|
|
|
|
|
132
|
$result->_set_field_def($self); |
30
|
4
|
|
|
|
|
10
|
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
|
|
|
|
16
|
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
|
30
|
|
|
30
|
|
129313
|
use namespace::autoclean; |
|
30
|
|
|
|
|
46
|
|
|
30
|
|
|
|
|
204
|
|
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.40067 |
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) 2016 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 |