[HTTP-Recorder] SOLUTION: Can't locate object method "query_param"

Grace CH Hensley grace at geospiza.com
Tue Oct 23 13:49:19 EDT 2007

Dear All,

A google search returned several complaints about the error "Can't  
locate object method "query_param"".  Thanks to a tip from Praveen  
Hombaiah (http://lists.bestpractical.com/pipermail/http-recorder/2006- 
February/000077.html), I diffed the subroutine causing my complaints  
from HTTP-Recorder version 0.05 with the one in HTTP-Recorder version  
0.03_03  (http://search.cpan.org/src/LEIRA/).

If you edit your version of /lib/HTTP/Recorder.pm and comment out the  
"for ... $content->query_param" section and paste in Leira's original  
content, then your proxy script should work.

sub unmodify {
     my $self = shift;
     my $content = shift;

     return $content unless $content;

     # get rid of the arguments we added
     my $prefix = $self->{prefix};

     #for my $key ($content->query_param) {
     #if ($key =~ /^$prefix-/) {
     #    $content->query_param_delete($key);

     #ADD THIS
     $content =~ s/$prefix-(.*?)\?(.*?)&//g;
     $content =~ s/$prefix-(.*?)&//g;
     $content =~ s/$prefix-(.*?)$//g;
     $content =~ s/&$//g;
     $content =~ s/\?$//g;

     return $content;

Grace at Geospiza dot com

Geospiza, Inc,
Seattle, WA

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/http-recorder/attachments/20071023/be2ebdad/attachment.htm

More information about the HTTP-Recorder mailing list