build script
[perl/html-form-simple.git] / lib / HTML / Form / Simple.pm
index bbeb6b6fbf1c6b49ebccca76b8a1573cc6cce452..730c41bc25b8c361738b2fa6ec5085856289c1e0 100644 (file)
@@ -76,6 +76,11 @@ sub hidden {
                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};
@@ -205,7 +210,7 @@ sub check {
 
 =head1 NAME
 
-HTML::Form::Simple
+HTML::Form::Simple - Generate HTML form elements
 
 =head1 SYNOPSIS
 
@@ -230,3 +235,12 @@ HTML::Form::Simple
        );
        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.
+