line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Element::File; |
2
|
|
|
|
|
|
|
|
3
|
11
|
|
|
11
|
|
807
|
use strict; |
|
11
|
|
|
|
|
13
|
|
|
11
|
|
|
|
|
443
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
11
|
|
|
11
|
|
37
|
use Moose; |
|
11
|
|
|
|
|
12
|
|
|
11
|
|
|
|
|
71
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
extends 'HTML::FormFu::Element'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with 'HTML::FormFu::Role::Element::Input'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
after BUILD => sub { |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$self->field_type('file'); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$self->form->enctype('multipart/form-data'); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
return; |
20
|
|
|
|
|
|
|
}; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 NAME |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
HTML::FormFu::Element::File - File upload form field |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 VERSION |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
version 2.05 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
--- |
39
|
|
|
|
|
|
|
elements: |
40
|
|
|
|
|
|
|
type: File |
41
|
|
|
|
|
|
|
name: photo |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $photo = $form->param('photo'); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
my $blob = $photo->slurp; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
File upload form field. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
See the documentation relevant to the L<query_type|HTML::FormFu/query_type> |
52
|
|
|
|
|
|
|
you're using: |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=over |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=item L<HTML::FormFu::QueryType::CGI> |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=item L<HTML::FormFu::QueryType::Catalyst> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item L<HTML::FormFu::QueryType::CGI::Simple> |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=back |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 METHODS |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 SEE ALSO |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from |
69
|
|
|
|
|
|
|
L<HTML::FormFu::Role::Element::Input>, |
70
|
|
|
|
|
|
|
L<HTML::FormFu::Role::Element::Field>, |
71
|
|
|
|
|
|
|
L<HTML::FormFu::Element> |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
L<HTML::FormFu> |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 AUTHOR |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 LICENSE |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
82
|
|
|
|
|
|
|
the same terms as Perl itself. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |