in reply to Subclassing WWW::Mechanize

Here's my quick fix:

sub _make_request { my ($self,$request,@rest) = @_; # fake a proxy $self->proxy( [ undef ] ); my $uri = $request->uri->as_string; my $response_content = "foobar\n"; # we'll probably have to build in support for redirects at some po +int my $response = HTTP::Response->new( defined $response_content ? RC_OK : RC_NOT_FOUND, ); $response->request($request); $response->push_header('Content-Type', 'text/html'); $response->content($response_content); return $response; }

It's a hack i know, but it gives me this output (with some added debug code (LWP::Debug))

LWP::UserAgent::new: () LWP::UserAgent::proxy: ARRAY(0x1ccb53c) LWP::UserAgent::proxy: undef LWP::UserAgent::proxy: foobar LWP::UserAgent::proxy: ARRAY(0x1da22b4) LWP::UserAgent::proxy: undef LWP::UserAgent::proxy: foobar

--
"To err is human, but to really foul things up you need a computer." --Paul Ehrlich