diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-01-12 11:44:09 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-01-12 11:44:09 -0600 |
commit | 9970a68dbb108d36b16595d26b827a7d63223155 (patch) | |
tree | fc29554cd9c21e644e4f0b88b5c41aafdc2ab216 /lib/Plack/Client/Backend/http.pm | |
parent | 887ef01b958d7c45fc7ea29d9b0ff570a54505dc (diff) | |
download | plack-client-9970a68dbb108d36b16595d26b827a7d63223155.tar.gz plack-client-9970a68dbb108d36b16595d26b827a7d63223155.zip |
add Plack::Client::Backend as a base class
Diffstat (limited to 'lib/Plack/Client/Backend/http.pm')
-rw-r--r-- | lib/Plack/Client/Backend/http.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Plack/Client/Backend/http.pm b/lib/Plack/Client/Backend/http.pm index e443385..542c2ce 100644 --- a/lib/Plack/Client/Backend/http.pm +++ b/lib/Plack/Client/Backend/http.pm @@ -5,6 +5,8 @@ use warnings; use Plack::App::Proxy; +use base 'Plack::Client::Backend'; + =head1 SYNOPSIS Plack::Client->new( @@ -30,11 +32,11 @@ Constructor. Takes no arguments. sub new { my $class = shift; - my %params = @_; + my $self = $class->SUPER::new(@_); + + $self->{proxy} = Plack::App::Proxy->new->to_app; - bless { - proxy => Plack::App::Proxy->new->to_app, - }, $class; + return $self; } sub _proxy { shift->{proxy} } |