line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Rose::HTML::Form::Field::Hidden; |
2
|
|
|
|
|
|
|
|
3
|
19
|
|
|
19
|
|
107554
|
use strict; |
|
19
|
|
|
|
|
49
|
|
|
19
|
|
|
|
|
732
|
|
4
|
|
|
|
|
|
|
|
5
|
19
|
|
|
19
|
|
108
|
use base 'Rose::HTML::Form::Field::Input'; |
|
19
|
|
|
|
|
38
|
|
|
19
|
|
|
|
|
9354
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.616'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
__PACKAGE__->delete_valid_html_attrs(qw(disabled ismap usemap alt src tabindex |
10
|
|
|
|
|
|
|
checked maxlength onblur onchange onclick ondblclick onfocus onkeydown |
11
|
|
|
|
|
|
|
onkeypress onkeyup onmousedown onmousemove onmouseout onmouseover onmouseup |
12
|
|
|
|
|
|
|
onselect readonly size title accesskey)); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
__PACKAGE__->add_required_html_attrs('value'); |
15
|
|
|
|
|
|
|
__PACKAGE__->required_html_attr_value(type => 'hidden'); |
16
|
|
|
|
|
|
|
|
17
|
0
|
0
|
|
0
|
1
|
0
|
sub hidden_fields { (wantarray) ? shift : [ shift ] } |
18
|
0
|
0
|
|
0
|
1
|
0
|
sub html_hidden_fields { (wantarray) ? shift->html_field : [ shift->html_field ] } |
19
|
0
|
0
|
|
0
|
1
|
0
|
sub xhtml_hidden_fields { (wantarray) ? shift->xhtml_field : [ shift->xhtml_field ] } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
153
|
1
|
|
sub error { } |
22
|
|
|
|
0
|
0
|
|
sub errors { } |
23
|
0
|
|
|
0
|
1
|
0
|
sub has_error { 0 } |
24
|
0
|
|
|
0
|
0
|
0
|
sub has_errors { 0 } |
25
|
0
|
|
|
0
|
1
|
0
|
sub validate { 1 } |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub html_field |
28
|
|
|
|
|
|
|
{ |
29
|
87
|
|
|
87
|
1
|
1382
|
my($self) = shift; |
30
|
87
|
|
|
|
|
253
|
$self->html_attr(value => $self->output_value); |
31
|
87
|
|
|
|
|
321
|
return $self->SUPER::html_field(@_); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub xhtml_field |
35
|
|
|
|
|
|
|
{ |
36
|
44
|
|
|
44
|
1
|
102
|
my($self) = shift; |
37
|
44
|
|
|
|
|
124
|
$self->html_attr(value => $self->output_value); |
38
|
44
|
|
|
|
|
218
|
return $self->SUPER::xhtml_field(@_); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 NAME |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Rose::HTML::Form::Field::Hidden - Object representation of a hidden field in an HTML form. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SYNOPSIS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
$field = |
52
|
|
|
|
|
|
|
Rose::HTML::Form::Field::Hidden->new( |
53
|
|
|
|
|
|
|
name => 'code', |
54
|
|
|
|
|
|
|
default => '1234'); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
print $field->html; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
... |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 DESCRIPTION |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
L<Rose::HTML::Form::Field::Hidden> is an object representation of a hidden field in an HTML form. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
This class inherits from, and follows the conventions of, L<Rose::HTML::Form::Field>. Inherited methods that are not overridden will not be documented a second time here. See the L<Rose::HTML::Form::Field> documentation for more information. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 HTML ATTRIBUTES |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Valid attributes: |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
accept |
71
|
|
|
|
|
|
|
class |
72
|
|
|
|
|
|
|
dir |
73
|
|
|
|
|
|
|
id |
74
|
|
|
|
|
|
|
lang |
75
|
|
|
|
|
|
|
name |
76
|
|
|
|
|
|
|
style |
77
|
|
|
|
|
|
|
type |
78
|
|
|
|
|
|
|
value |
79
|
|
|
|
|
|
|
xml:lang |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Required attributes (default values in parentheses): |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
type (hidden) |
84
|
|
|
|
|
|
|
value |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 CONSTRUCTOR |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=over 4 |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item B<new PARAMS> |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Constructs a new L<Rose::HTML::Form::Field::Hidden> object based on PARAMS, where PARAMS are name/value pairs. Any object method is a valid parameter name. |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=back |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 OBJECT METHODS |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=over 4 |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item B<error> |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
This method is a no-op. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item B<has_error> |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Returns false. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=back |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHOR |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
John C. Siracusa (siracusa@gmail.com) |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 LICENSE |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |