[Chicago-talk] WSJ.com signon form has changed as of Sunday. Did
anyone else notice this?
ehs at pobox.com
Mon Nov 3 08:59:01 CST 2003
On Sun, Nov 02, 2003 at 07:26:35PM -0800, Richard Solberg wrote:
> my $request = $ua->request( POST
> my $form = HTML::Form->parse( $request->content,
> print $form->dump;
That error indicates to me that the $form object is not defined. I just
took a look at the HTML::Form doc , and it looks like the call to parse()
will return an empty list when there are no forms found in the content that
is passed in to parse. So it would appear that the result of
$request->content() does not contain a form, perhaps even no HTML.
Make sure you are getting the HTML content you expect when you call
request()...maybe do a little print $request->content() somewhere :)
It's also worth noting that you are basically doing what WWW::Mechanize 
does here, by using LWP::UserAgent with HTML::Form. You might want to
consider making your life easier by using WWW::Mechanize...but you
are probably already aware of this.
More information about the Chicago-talk