lib/HTML/FormFu/Element/File.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 100% 19 / 19 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.0
« lib/HTML/FormFu/Element/Email.pm ↑ Summary lib/HTML/FormFu/Element/Hidden.pm »
1 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package HTML::FormFu::Element::File;
4 10 $HTML::FormFu::Element::File::VERSION = '2.06';
5 # ABSTRACT: File upload form field
6  
7 10 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 10 extends 'HTML::FormFu::Element';
10  
11 10 with 'HTML::FormFu::Role::Element::Input';
12  
13 after BUILD => sub {
14 18 ▶ my $self = shift;
Subroutine __ANON__: called CC=1 SCAR=0.0
15  
16 18 $self->field_type('file');
17  
18 18 $self->form->enctype('multipart/form-data');
19  
20 18 return;
21 10 };
22  
23 10 __PACKAGE__->meta->make_immutable;
24  
25 10 1;
26  
27 __END__
28  
29 =pod
30  
31 =encoding UTF-8
32  
33 =head1 NAME
34  
35 HTML::FormFu::Element::File - File upload form field
36  
37 =head1 VERSION
38  
39 version 2.06
40  
41 =head1 SYNOPSIS
42  
43 ---
44 elements:
45 type: File
46 name: photo
47  
48 my $photo = $form->param('photo');
49  
50 my $blob = $photo->slurp;
51  
52 =head1 DESCRIPTION
53  
54 File upload form field.
55  
56 See the documentation relevant to the L<query_type|HTML::FormFu/query_type>
57 you're using:
58  
59 =over
60  
61 =item L<HTML::FormFu::QueryType::CGI>
62  
63 =item L<HTML::FormFu::QueryType::Catalyst>
64  
65 =item L<HTML::FormFu::QueryType::CGI::Simple>
66  
67 =back
68  
69 =head1 METHODS
70  
71 =head1 SEE ALSO
72  
73 Is a sub-class of, and inherits methods from
74 L<HTML::FormFu::Role::Element::Input>,
75 L<HTML::FormFu::Role::Element::Field>,
76 L<HTML::FormFu::Element>
77  
78 L<HTML::FormFu>
79  
80 =head1 AUTHOR
81  
82 Carl Franks, C<cfranks@cpan.org>
83  
84 =head1 LICENSE
85  
86 This library is free software, you can redistribute it and/or modify it under
87 the same terms as Perl itself.
88  
89 =head1 AUTHOR
90  
91 Carl Franks <cpan@fireartist.com>
92  
93 =head1 COPYRIGHT AND LICENSE
94  
95 This software is copyright (c) 2018 by Carl Franks.
96  
97 This is free software; you can redistribute it and/or modify it under
98 the same terms as the Perl 5 programming language system itself.
99  
100 =cut
« lib/HTML/FormFu/Element/Email.pm ↑ Summary lib/HTML/FormFu/Element/Hidden.pm »