git.shiar.nl
/
perl
/
html-form-simple.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
XXX: hidden options
[perl/html-form-simple.git]
/
lib
/
HTML
/
Form
/
Simple.pm
diff --git
a/lib/HTML/Form/Simple.pm
b/lib/HTML/Form/Simple.pm
index 4eddc98188b7c543653465b52347dbc8fb1ee431..66958c3c294d760d7729474a4ba829de9e3e1b10 100644
(file)
--- a/
lib/HTML/Form/Simple.pm
+++ b/
lib/HTML/Form/Simple.pm
@@
-71,8
+71,9
@@
sub hidden {
my $self = shift;
my ($name, $value, $attr) = $self->_attr(2, @_);
my $self = shift;
my ($name, $value, $attr) = $self->_attr(2, @_);
- $attr = {type => 'hidden', name => $name, value => $value};
- #TODO: $attr
+ $attr->{name } = $name if defined $name;
+ $attr->{value} = $value if defined $value;
+ $attr->{type} = 'hidden' unless defined $attr->{type};
return $self->tag(input => $attr);
}
return $self->tag(input => $attr);
}