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};
return $self->tag(input => $attr);
}
-sub input {
+sub text {
my $self = shift;
my ($name, $value, $attr) = $self->_attr(2, @_);
=head1 NAME
-HTML::Form::Simple
+HTML::Form::Simple - Generate HTML form elements
=head1 SYNOPSIS
);
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.
+