line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Element::Email; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
805
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
83
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
9
|
use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
14
|
|
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('email'); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$self->constraint('Email'); |
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::Email - HTML5 email form field |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 VERSION |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
version 2.05 |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 SYNOPSIS |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my $element = $form->element( Email => 'foo' ); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# no need to add a separate Constraint::Email |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 DESCRIPTION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
HTML5 email form field which provides native client-side validation in modern browsers. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Creates an input field with C<<type="email">>. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
This element automatically adds an L<Email constraint|HTML::FormFu::Constraint::Email>, |
49
|
|
|
|
|
|
|
so you don't have to. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SEE ALSO |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from |
54
|
|
|
|
|
|
|
L<HTML::FormFu::Role::Element::Input>, |
55
|
|
|
|
|
|
|
L<HTML::FormFu::Role::Element::Field>, |
56
|
|
|
|
|
|
|
L<HTML::FormFu::Element>. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
L<HTML::FormFu> |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 LICENSE |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
67
|
|
|
|
|
|
|
the same terms as Perl itself. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |