lib/HTML/FormFu/Element/Email.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/Button.pm ↑ Summary lib/HTML/FormFu/Element/File.pm »
1 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2  
3 package HTML::FormFu::Element::Email;
4 2 $HTML::FormFu::Element::Email::VERSION = '2.06';
5 # ABSTRACT: HTML5 email form field
6  
7 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 extends 'HTML::FormFu::Element';
10  
11 2 with 'HTML::FormFu::Role::Element::Input';
12  
13 after BUILD => sub {
14 1 ▶ my $self = shift;
Subroutine __ANON__: called CC=1 SCAR=0.0
15  
16 1 $self->field_type('email');
17  
18 1 $self->constraint('Email');
19  
20 1 return;
21 2 };
22  
23 2 __PACKAGE__->meta->make_immutable;
24  
25 2 1;
26  
27 __END__
28  
29 =pod
30  
31 =encoding UTF-8
32  
33 =head1 NAME
34  
35 HTML::FormFu::Element::Email - HTML5 email form field
36  
37 =head1 VERSION
38  
39 version 2.06
40  
41 =head1 SYNOPSIS
42  
43 my $element = $form->element( Email => 'foo' );
44  
45 # no need to add a separate Constraint::Email
46  
47 =head1 DESCRIPTION
48  
49 HTML5 email form field which provides native client-side validation in modern browsers.
50  
51 Creates an input field with C<<type="email">>.
52  
53 This element automatically adds an L<Email constraint|HTML::FormFu::Constraint::Email>,
54 so you don't have to.
55  
56 =head1 SEE ALSO
57  
58 Is a sub-class of, and inherits methods from
59 L<HTML::FormFu::Role::Element::Input>,
60 L<HTML::FormFu::Role::Element::Field>,
61 L<HTML::FormFu::Element>.
62  
63 L<HTML::FormFu>
64  
65 =head1 AUTHOR
66  
67 Carl Franks, C<cfranks@cpan.org>
68  
69 =head1 LICENSE
70  
71 This library is free software, you can redistribute it and/or modify it under
72 the same terms as Perl itself.
73  
74 =head1 AUTHOR
75  
76 Carl Franks <cpan@fireartist.com>
77  
78 =head1 COPYRIGHT AND LICENSE
79  
80 This software is copyright (c) 2018 by Carl Franks.
81  
82 This is free software; you can redistribute it and/or modify it under
83 the same terms as the Perl 5 programming language system itself.
84  
85 =cut
« lib/HTML/FormFu/Element/Button.pm ↑ Summary lib/HTML/FormFu/Element/File.pm »