Subject: | HTML::Form generates invalid post requests |
in some cases WWW::Mechanize generates bad post requests. several fields
are sent multiple times. once with an empty value and once with the one
i pass to submit_form(). i did not have enough time to investigate the
root cause of the problem, but it can be workarounded as follows. the
code filters out duplicate fields from the list and then behaves as usual.
sub HTML::Form::form {
my $self = shift;
my %inputs = map { ($_->name => $_) } @{$self->{'inputs'}};
map { $_->form_name_value($self) } values %inputs;
}