Hoping to get some clarity on
a question I posed here a couple of days ago (and for which I still seek guidance), I spent some time making HTTP::Recorder work. But my http://http-recorder, refuses to connect directly to the form I'm interested in, on reload from that crashed tab it redirects to a page where I am logged in, but several clicks away from the target page I need to study, hopefully with a little help. As I make my way there, inside the http-recorder page, I find myself redirected and connecting directly, with nothing being recorded, and by the time I make it to my page, it gives me a wsod.
So I turned off javascript and java in the browser, and although I retested it with a page which I know not to rely on any javascript (I wrote it), still nothing. It won't let me get as far as watching it uncheck the checkboxes.
Truth is I'd be happy to give up on making HTTP::Recorder work right now if I had some other strategy for unclicking these checkboxes. I'm guessing that having these checkboxes named as newsletters[17], which those square brackets is not making this any easier and I wonder if I need to escape them somehow.
But in the mean time, it seems I'm seeking help with either or both issues, one related to HTTP::Recorder, and another more directly with WWW::Mechanize. Any help would be appreciated.
And I wonder what dependency I might be missing to get these no such method errors looking for ->query_param().
My proxy ought to look familiar to anyone who has read the perldoc and reads like this:
#!/usr/bin/perl
use HTTP::Proxy;
use HTTP::Recorder;
my $proxy = HTTP::Proxy->new( port => 3128 );
my $agent = new HTTP::Recorder;
$agent->file("/tmp/myfile");
$proxy->agent( $agent );
$proxy->start();
1;
These lines are representative of the errors I'm seeing on the cli:
Can't locate object method "query_param" via package "goog-malware-sha
+var;a:28110-35247:s:40850-47742:mac
goog-phish-shavar;a:130797-135112:s:67196-68895:mac
" (perhaps you forgot to load "goog-malware-shavar;a:28110-35247:s:408
+50-47742:mac
goog-phish-shavar;a:130797-135112:s:67196-68895:mac
"?) at /usr/local/share/perl/5.10.0/HTTP/Recorder.pm line 347.
[Mon Apr 4 22:14:13 2011] (17230) ERROR: Getting request failed: Clie
+nt closed
[Mon Apr 4 22:24:00 2011] (17323) ERROR: Getting request failed: sysr
+ead: Connection reset by peer
Can't locate object method "query_param" via package "rec-action=submi
+tform&rec-formname=&rec-formnumber=2&rec-https=1&rec-form2-text-keys=
+1&keys=hesco-test2&rec-form2-submit-op=1&op=Search&rec-form2-hidden-f
+orm_build_id=1&form_build_id=form-6d45e9ace1a3033599dabedd422d983a&re
+c-form2-hidden-form_token=1&form_token=2658acbbc0de3c846c50d584148250
+68&rec-form2-hidden-form_id=1&form_id=search_form" (perhaps you forgo
+t to load "rec-action=submitform&rec-formname=&rec-formnumber=2&rec-h
+ttps=1&rec-form2-text-keys=1&keys=hesco-test2&rec-form2-submit-op=1&o
+p=Search&rec-form2-hidden-form_build_id=1&form_build_id=form-6d45e9ac
+e1a3033599dabedd422d983a&rec-form2-hidden-form_token=1&form_token=265
+8acbbc0de3c846c50d58414825068&rec-form2-hidden-form_id=1&form_id=sear
+ch_form"?) at /usr/local/share/perl/5.10.0/HTTP/Recorder.pm line 347.
Can't call method "query_param" without a package or object reference
+at /usr/local/share/perl/5.10.0/HTTP/Recorder.pm line 347.
Use of uninitialized value $args{"value"} in substitution (s///) at /u
+sr/local/share/perl/5.10.0/HTTP/Recorder/Logger.pm line 171.
Use of uninitialized value $args{"value"} in concatenation (.) or stri
+ng at /usr/local/share/perl/5.10.0/HTTP/Recorder/Logger.pm line 173.
Use of uninitialized value $args{"value"} in substitution (s///) at /u
+sr/local/share/perl/5.10.0/HTTP/Recorder/Logger.pm line 171.
Use of uninitialized value $args{"value"} in concatenation (.) or stri
+ng at /usr/local/share/perl/5.10.0/HTTP/Recorder/Logger.pm line 173.
if( $lal && $lol ) { $life++; }
if( $insurance->rationing() ) { $people->die(); }
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.