Re: HTML::Form not submitting submit button name/value

Gisle Aas <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
On Tue, Aug 11, 2009 at 08:24, <[email protected]> wrote:
> On Mon, 10 Aug 2009, Gisle Aas wrote:
>
>> HTML::Form supported both these by calling either ->make_request or
>> ->click method. If all modern browsers agree that the button value
>> should always be passed we should change as well.
>
> Interesting, both click() and make_request() yield the same result
> here, excluding the name/value of the submit button in both cases:

It does not here:

use HTML::Form;
my $f = HTML::Form->parse(<<'EOT', "http://localhost/");

   <form>
      <input type=submit value="Upload it!" name=n>
      <input type=text name=t value="1">
   </form>
EOT

print $f->click->as_string, "\n";
print $f->make_request->as_string, "\n";

__END__

This prints:

GET http://localhost/?n=Upload+it!&t=1
GET http://localhost/?t=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.