diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-08-19 10:40:23 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-08-19 10:40:23 -0500 |
commit | 4310a8e3c45dcad070981eb572ccfcb877f8233f (patch) | |
tree | f4e5214ecec3bee36be06285bb6e19fe9971e77a /lib | |
parent | fbeba3e0c7cb53bce4302b4ac206a0f9b169d20f (diff) | |
download | web-request-4310a8e3c45dcad070981eb572ccfcb877f8233f.tar.gz web-request-4310a8e3c45dcad070981eb572ccfcb877f8233f.zip |
can't just pass this in the constructor if people use the arrayref form
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Web/Request.pm | 4 | ||||
-rw-r--r-- | lib/Web/Response.pm | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/Web/Request.pm b/lib/Web/Request.pm index 3830344..f889f62 100644 --- a/lib/Web/Request.pm +++ b/lib/Web/Request.pm @@ -421,7 +421,9 @@ sub new_response { my $self = shift; Class::Load::load_class($self->response_class); - $self->response_class->new(_encoding_obj => $self->_encoding_obj, @_); + my $res = $self->response_class->new(@_); + $res->_encoding_obj($self->_encoding_obj); + return $res; } sub _new_upload { diff --git a/lib/Web/Response.pm b/lib/Web/Response.pm index 7ab39db..914cbbd 100644 --- a/lib/Web/Response.pm +++ b/lib/Web/Response.pm @@ -71,7 +71,7 @@ has cookies => ( ); has _encoding_obj => ( - is => 'ro', + is => 'rw', isa => 'Object', predicate => 'has_encoding', handles => { |