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

[email protected]
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
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:

     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->make_request->as_string(), "\n";

which prints

     GET http://localhost/?t=1

I'd venture that the submit button should be included in both cases,
but I'd have to check the standard to be sure.

-- Mike

Mike Schilli
[email protected]
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.