| 1 | package CGI::Test::Form::Widget::Input::Password; | ||
| 2 | 14 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 14 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 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 | ▶ | use base qw(CGI::Test::Form::Widget::Input::Text_Field); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | |||
| 26 | # | ||
| 27 | # Attribute access | ||
| 28 | # | ||
| 29 | |||
| 30 | sub gui_type | ||
| 31 | 0 | ▶ | { |
|
Subroutine
gui_type: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 32 | 0 | return "password field"; | |
| 33 | } | ||
| 34 | |||
| 35 | # | ||
| 36 | # Redefined predicates | ||
| 37 | # | ||
| 38 | |||
| 39 | sub is_field | ||
| 40 | 0 | ▶ | { |
|
Subroutine
is_field: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 41 | 0 | return 0; | |
| 42 | } # not a pure text field | ||
| 43 | |||
| 44 | sub is_password | ||
| 45 | 0 | ▶ | { |
|
Subroutine
is_password: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 46 | 0 | return 1; | |
| 47 | } | ||
| 48 | |||
| 49 | 14 | 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<CGI::Test::Form::Widget::Input::Text_Field>. | ||
| 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 F<E<lt>tokarev@cpan.orgE<gt>>. | ||
| 79 | |||
| 80 | =head1 SEE ALSO | ||
| 81 | |||
| 82 | CGI::Test::Form::Widget::Input(3). | ||
| 83 | |||
| 84 | =cut | ||
| 85 | |||