line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
HTML::Tested::Value::PasswordBox - password input. |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 DESCRIPTION |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Provides html tag. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 METHODS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=cut |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
2267
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
14
|
1
|
|
|
1
|
|
6
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
58
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
package HTML::Tested::Value::PasswordBox; |
17
|
1
|
|
|
1
|
|
5
|
use base 'HTML::Tested::Value'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
297
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 $class->new($parent, $name, %opts) |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Overloads C C function to handle C |
22
|
|
|
|
|
|
|
option. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=cut |
25
|
|
|
|
|
|
|
sub new { |
26
|
5
|
|
|
5
|
1
|
16
|
my ($class, $parent, $name, %opts) = @_; |
27
|
5
|
|
|
|
|
11
|
my $other = $opts{check_mismatch}; |
28
|
1
|
|
|
|
|
8
|
push @{ $opts{constraints} }, [ mismatch => sub { |
29
|
4
|
|
|
4
|
|
9
|
my ($v, $root) = @_; |
30
|
4
|
|
100
|
|
|
21
|
return ($v // '') eq ($root->$other // ''); |
|
|
|
100
|
|
|
|
|
31
|
5
|
100
|
|
|
|
18
|
} ] if $other; |
32
|
5
|
|
|
|
|
36
|
return $class->SUPER::new($parent, $name, %opts); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub value_to_string { |
36
|
1
|
|
|
1
|
1
|
3
|
my ($self, $name, $val) = @_; |
37
|
1
|
|
|
|
|
7
|
return <
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
ENDS |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 OPTIONS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=over |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=item check_mismatch |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Checks mismatch between two passwords during validate phase. The parameter |
51
|
|
|
|
|
|
|
should be the name of another password box. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
E.g. check_mismatch => 'another_password'. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
On failure produces C result for validate function. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=back |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 AUTHOR |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Boris Sukholitko (boriss@gmail.com) |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 COPYRIGHT |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This program is free software; you can redistribute |
66
|
|
|
|
|
|
|
it and/or modify it under the same terms as Perl itself. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
The full text of the license can be found in the |
69
|
|
|
|
|
|
|
LICENSE file included with this module. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |