diff options
author | franck cuny <franck@lumberjaph.net> | 2009-07-02 15:19:17 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2009-07-02 15:19:17 +0200 |
commit | 46e359d9c21770c8a91743143b85d5a8d05fb730 (patch) | |
tree | 2cb5f90a6dbdd19c53e37d0ee459aa543ea98c92 | |
parent | don't need config (diff) | |
download | moosex-useragent-46e359d9c21770c8a91743143b85d5a8d05fb730.tar.gz |
use var. _lwplib
-rw-r--r-- | lib/MooseX/UserAgent.pm | 2 | ||||
-rw-r--r-- | lib/MooseX/UserAgent/Config.pm | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/MooseX/UserAgent.pm b/lib/MooseX/UserAgent.pm index 2e1b2f2..bc72821 100644 --- a/lib/MooseX/UserAgent.pm +++ b/lib/MooseX/UserAgent.pm @@ -14,6 +14,8 @@ with qw/ MooseX::UserAgent::Cache /; +has _LWPLIB => ( isa => 'Str', is => 'ro', default => 'LWP::UserAgent' ); + sub fetch { my ( $self, $url ) = @_; diff --git a/lib/MooseX/UserAgent/Config.pm b/lib/MooseX/UserAgent/Config.pm index 0b9beb4..cf453b0 100644 --- a/lib/MooseX/UserAgent/Config.pm +++ b/lib/MooseX/UserAgent/Config.pm @@ -8,9 +8,10 @@ has 'agent' => ( lazy => 1, default => sub { my $self = shift; - my $ua = LWP::UserAgent->new; + my $ua = $self->_LWPLIB->new; if (!$self->can('useragent_conf')) { + # TODO } my $conf = $self->useragent_conf; $ua->agent( $conf->{name} ) if $conf->{name}; |