in reply to Re^3: How to override HTTP::UserAgent::request to return a subclassed HTTP::Response
in thread How to override HTTP::UserAgent::request to return a subclassed HTTP::Response
That is more of what I was thinking but I wasn't sure how to turn an HTTP::Response into a XXX::HTTP::Response (not liking the look of Acme::Damn). When you made your reply were you basically suggesting a combination of overriding LWP::UserAgent::request and cloning the HTTP::Response into an XXX::HTTP::Response?
package XXX::LWP::UserAgent; use base qw(LWP::UserAgent); sub request { my $self = shift; my $resp = $self->SUPER::request(@_); return XXX::HTTP::Response::clone_from_http_response($resp); }
or is there perhaps some other way of avoiding duplicating LWP::UserAgent::request.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to override HTTP::UserAgent::request to return a subclassed HTTP::Response
by Corion (Patriarch) on Jun 01, 2009 at 15:37 UTC | |
by mje (Curate) on Jun 01, 2009 at 16:12 UTC | |
by Corion (Patriarch) on Jun 01, 2009 at 16:22 UTC |