File Coverage

blib/lib/Rose/HTML/Form/Field/Input.pm
Criterion Covered Total %
statement 9 10 90.0
branch n/a
condition n/a
subroutine 5 6 83.3
pod 4 4 100.0
total 18 20 90.0


line stmt bran cond sub pod time code
1             package Rose::HTML::Form::Field::Input;
2              
3 32     32   264 use strict;
  32         77  
  32         1676  
4              
5 32     32   163 use base 'Rose::HTML::Form::Field';
  32         69  
  32         17187  
6              
7             our $VERSION = '0.626';
8              
9             __PACKAGE__->add_valid_html_attrs
10             (
11             'size', # CDATA #IMPLIED -- specific to each type of field --
12             'maxlength', # NUMBER #IMPLIED -- max chars for text fields --
13             'src', # %URI; #IMPLIED -- for fields with images --
14             'alt', # CDATA #IMPLIED -- short description --
15             'usemap', # %URI; #IMPLIED -- use client-side image map --
16             'ismap', # (ismap) #IMPLIED -- use server-side image map --
17             'tabindex', # NUMBER #IMPLIED -- position in tabbing order --
18             'accesskey', # %Character; #IMPLIED -- accessibility key character --
19             'onfocus', # %Script; #IMPLIED -- the element got the focus --
20             'onblur', # %Script; #IMPLIED -- the element lost the focus --
21             'onselect', # %Script; #IMPLIED -- some text was selected --
22             'onchange', # %Script; #IMPLIED -- the element value was changed --
23             'accept', # %ContentTypes; #IMPLIED -- list of MIME types for file upload --
24             'type', # %InputType; "text"
25             'name', # CDATA #IMPLIED
26             'value', # CDATA #IMPLIED
27             'checked', # (checked) #IMPLIED
28             'disabled', # (disabled) #IMPLIED
29             'readonly', # (readonly) #IMPLIED
30             'required',
31             'placeholder',
32             'formaction',
33             'formenctype',
34             'formmethod',
35             'formnovalidate',
36             'formtarget',
37             'min',
38             'max',
39             'step',
40             );
41              
42             __PACKAGE__->add_required_html_attrs(
43             {
44             type => 'text',
45             });
46              
47             __PACKAGE__->add_boolean_html_attrs
48             (
49             'disabled',
50             'required',
51             'readonly',
52             'ismap',
53             'checked',
54             );
55              
56 0     0 1 0 sub element { 'input' }
57 1268     1268 1 4883 sub html_element { 'input' }
58 296     296 1 1087 sub xhtml_element { 'input' }
59              
60 782     782 1 2592 sub is_self_closing { 1 }
61              
62             1;