App-Widget
view release on metacpan or search on metacpan
lib/App/Widget/Password.pm view on Meta::CPAN
size => 8, # from HTML spec
maxlength => 18, # from HTML spec
tabindex => 1, # from HTML spec
style => "mystyle", # from HTML to support CSS
color => "#6666CC", # from CSS spec
font_size => "10px", # from CSS spec
border_style => "solid", # from CSS spec
border_width => "1px", # from CSS spec
border_color => "#6666CC", # from CSS spec
padding => "2px", # from CSS spec
background_color => "#ccffcc", # from CSS spec
font_family => "Verdana, Geneva, Arial", # from CSS spec
override => 1, # increase precedence of following options to "override" from "default"
#validate => "date", # not impl. yet ("date", "time", "datetime", "enum", "number", "integer", ":regexp")
#autocomplete => \@previous_choices, # not impl. yet
);
# internal way
use App::Widget::Password;
$w = App::Widget::Password->new($name);
=cut
######################################################################
# CONSTANTS
######################################################################
######################################################################
# ATTRIBUTES
######################################################################
# INPUTS FROM THE ENVIRONMENT
=head1 DESCRIPTION
This class is a <input type=password> HTML element.
=cut
######################################################################
# INITIALIZATION
######################################################################
# no special initialization
######################################################################
# EVENTS
######################################################################
# no events
######################################################################
# OUTPUT METHODS
######################################################################
sub unstyled_html {
my $self = shift;
my ($name, $value, $html_value, $html, $var, $size, $maxlength, $tabindex);
$name = $self->{name};
$value = $self->fget_value();
$html_value = $self->html_escape($value);
$size = $self->get("size");
$maxlength = $self->get("maxlength");
$tabindex = $self->get("tabindex");
$html = "<input type=\"password\" name=\"${name}\" value=\"$html_value\"";
$html .= " size=\"$size\"" if ($size);
$html .= " maxlength=\"$maxlength\"" if ($maxlength);
$html .= " tabindex=\"$tabindex\"" if ($tabindex);
$html .= "/>";
$html;
}
1;
( run in 0.469 second using v1.01-cache-2.11-cpan-437f7b0c052 )