line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Test::Form::Widget::Input::Password; |
2
|
14
|
|
|
14
|
|
44
|
use strict; |
|
14
|
|
|
|
|
11
|
|
|
14
|
|
|
|
|
303
|
|
3
|
14
|
|
|
14
|
|
31
|
use warnings; |
|
14
|
|
|
|
|
14
|
|
|
14
|
|
|
|
|
247
|
|
4
|
|
|
|
|
|
|
################################################################## |
5
|
|
|
|
|
|
|
# $Id: Password.pm 411 2011-09-26 11:19:30Z nohuhu@nohuhu.org $ |
6
|
|
|
|
|
|
|
# $Name: cgi-test_0-104_t1 $ |
7
|
|
|
|
|
|
|
################################################################## |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Copyright (c) 2001, Raphael Manfredi |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
# You may redistribute only under the terms of the Artistic License, |
12
|
|
|
|
|
|
|
# as specified in the README file that comes with the distribution. |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
|
15
|
14
|
|
|
14
|
|
33
|
use Carp; |
|
14
|
|
|
|
|
14
|
|
|
14
|
|
|
|
|
574
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# |
18
|
|
|
|
|
|
|
# This class models a FORM password input field. |
19
|
|
|
|
|
|
|
# |
20
|
|
|
|
|
|
|
# It inherits from Text_Field, since the only distinction between a text field |
21
|
|
|
|
|
|
|
# and a password field is whether characters are shown as typed or not. |
22
|
|
|
|
|
|
|
# |
23
|
|
|
|
|
|
|
|
24
|
14
|
|
|
14
|
|
42
|
use base qw(CGI::Test::Form::Widget::Input::Text_Field); |
|
14
|
|
|
|
|
12
|
|
|
14
|
|
|
|
|
1331
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# |
27
|
|
|
|
|
|
|
# Attribute access |
28
|
|
|
|
|
|
|
# |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub gui_type |
31
|
|
|
|
|
|
|
{ |
32
|
0
|
|
|
0
|
1
|
|
return "password field"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# |
36
|
|
|
|
|
|
|
# Redefined predicates |
37
|
|
|
|
|
|
|
# |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub is_field |
40
|
|
|
|
|
|
|
{ |
41
|
0
|
|
|
0
|
1
|
|
return 0; |
42
|
|
|
|
|
|
|
} # not a pure text field |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub is_password |
45
|
|
|
|
|
|
|
{ |
46
|
0
|
|
|
0
|
1
|
|
return 1; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 NAME |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
CGI::Test::Form::Widget::Input::Password - A password field |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SYNOPSIS |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
# Inherits from CGI::Test::Form::Widget::Input |
58
|
|
|
|
|
|
|
# $form is a CGI::Test::Form |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
my $passwd = $form->input_by_name("password"); |
61
|
|
|
|
|
|
|
$passwd->replace("foobar"); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 DESCRIPTION |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This class models a password field, which is a text field whose input |
66
|
|
|
|
|
|
|
is masked by the browser, but which otherwise behaves like a regular |
67
|
|
|
|
|
|
|
text field. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
The interface is the same as the one described in |
70
|
|
|
|
|
|
|
L. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 AUTHORS |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
The original author is Raphael Manfredi. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Steven Hilton was long time maintainer of this module. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Current maintainer is Alexander Tokarev Ftokarev@cpan.orgE>. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 SEE ALSO |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
CGI::Test::Form::Widget::Input(3). |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=cut |
85
|
|
|
|
|
|
|
|