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
input method should be named text()
[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 bbeb6b6fbf1c6b49ebccca76b8a1573cc6cce452..3a58c799761a27e880891e321a7ec375166b75c4 100644
(file)
--- a/
lib/HTML/Form/Simple.pm
+++ b/
lib/HTML/Form/Simple.pm
@@
-76,6
+76,11
@@
sub hidden {
return wantarray ? @return : join(defined $, ? $, : '', @return);
}
return wantarray ? @return : join(defined $, ? $, : '', @return);
}
+ if (ref $value eq 'ARRAY') {
+ my @return = map { $self->hidden($name, $_, $attr) } @$value;
+ return wantarray ? @return : join(defined $, ? $, : '', @return);
+ }
+
$attr->{name } = $name if defined $name;
$attr->{value} = $value if defined $value;
$attr->{type} = 'hidden' unless defined $attr->{type};
$attr->{name } = $name if defined $name;
$attr->{value} = $value if defined $value;
$attr->{type} = 'hidden' unless defined $attr->{type};
@@
-83,7
+88,7
@@
sub hidden {
return $self->tag(input => $attr);
}
return $self->tag(input => $attr);
}
-sub
inpu
t {
+sub
tex
t {
my $self = shift;
my ($name, $value, $attr) = $self->_attr(2, @_);
my $self = shift;
my ($name, $value, $attr) = $self->_attr(2, @_);
@@
-205,7
+210,7
@@
sub check {
=head1 NAME
=head1 NAME
-HTML::Form::Simple
+HTML::Form::Simple
- Generate HTML form elements
=head1 SYNOPSIS
=head1 SYNOPSIS
@@
-230,3
+235,12
@@
HTML::Form::Simple
);
say $input->stop; # </form>
);
say $input->stop; # </form>
+=head1 AUTHOR
+
+Mischa POSLAWSKY <perl@shiar.org>
+
+=head1 LICENSE
+
+This module is free software; you can redistribute it and/or modify it
+under the same L<terms|perlartistic> as Perl itself.
+