Welcome to the Monastery | |
PerlMonks |
Re^2: "Unexpected field value" error from HTTP::Headers when using WWW::Mechanizeby bobf (Monsignor) |
on Mar 18, 2005 at 03:08 UTC ( [id://440614]=note: print w/replies, xml ) | Need Help?? |
Hi - thanks for checking my code. This code worked for you? I copied exactly what you posted (well, I changed $mech->submit_form to $mech_obj->submit_form) and I still got the same error:
It sounds like there is something else going on at my end. I'll have to keep digging. Thanks again for checking this out for me. Update: I added use Carp 'verbose' to the test script and got this:
The error is coming from the _header subroutine in HTTP::Headers. The code in question is this:
I added a Data::Dumper print statement to determine what $val was, and I got the following: which matches the "action" value in the $mech_obj above. The _header routine seems to want scalars (or a ref to an array), but it looks like it's getting a hash ref (or is it the whole object?) from the WWW::Mechanize object instead. I was not sure how to proceed, so emailed the authors of those modules. Additional suggestions are welcome. (Incidently, now that I know more about the error, I found a previous report of it in HTTP::Message.)
In Section
Seekers of Perl Wisdom
|
|