File Coverage

blib/lib/Rose/HTML/Form/Field/File.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Rose::HTML::Form::Field::File;
2              
3 2     2   108304 use strict;
  2         13  
  2         74  
4              
5 2     2   12 use base 'Rose::HTML::Form::Field::Text';
  2         4  
  2         664  
6              
7             our $VERSION = '0.606';
8              
9             __PACKAGE__->required_html_attr_value(type => 'file');
10             __PACKAGE__->delete_valid_html_attrs(qw(ismap usemap alt src));
11              
12             1;
13              
14             __END__
15              
16             =head1 NAME
17              
18             Rose::HTML::Form::Field::File - Object representation of a file upload field in an HTML form.
19              
20             =head1 SYNOPSIS
21              
22             $field =
23             Rose::HTML::Form::Field::File->new(
24             label => 'File',
25             name => 'file',
26             size => 32);
27              
28             print $field->html;
29              
30             ...
31              
32             =head1 DESCRIPTION
33              
34             L<Rose::HTML::Form::Field::File> is an object representation of a file upload field in an HTML form.
35              
36             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.
37              
38             =head1 HTML ATTRIBUTES
39              
40             Valid attributes:
41              
42             accept
43             accesskey
44             checked
45             class
46             dir
47             disabled
48             id
49             lang
50             maxlength
51             name
52             onblur
53             onchange
54             onclick
55             ondblclick
56             onfocus
57             onkeydown
58             onkeypress
59             onkeyup
60             onmousedown
61             onmousemove
62             onmouseout
63             onmouseover
64             onmouseup
65             onselect
66             readonly
67             size
68             style
69             tabindex
70             title
71             type
72             value
73             xml:lang
74              
75             Required attributes (default values in parentheses):
76              
77             name
78             size
79             type (file)
80             value
81              
82             Boolean attributes:
83              
84             checked
85             disabled
86             readonly
87             required
88              
89             =head1 CONSTRUCTOR
90              
91             =over 4
92              
93             =item B<new PARAMS>
94              
95             Constructs a new L<Rose::HTML::Form::Field::File> object based on PARAMS, where PARAMS are name/value pairs. Any object method is a valid parameter name.
96              
97             =back
98              
99             =head1 AUTHOR
100              
101             John C. Siracusa (siracusa@gmail.com)
102              
103             =head1 LICENSE
104              
105             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.