summaryrefslogtreecommitdiff
path: root/lib/Net/Riak/Role/UserAgent.pm
diff options
context:
space:
mode:
authorRobin Edwards <robin.ge@gmail.com>2013-02-18 13:06:05 +0000
committerRobin Edwards <robin.ge@gmail.com>2013-02-18 13:06:05 +0000
commit934be43b4b662bc15c04544f445a030ff716336e (patch)
tree69440a3fa5e988c70d9abbda0907c4c79fff56c3 /lib/Net/Riak/Role/UserAgent.pm
parentMerge pull request #20 from Mainframe2008/06063f56bb11f06593b114316f34f338fe5... (diff)
downloadnet-riak-934be43b4b662bc15c04544f445a030ff716336e.tar.gz
Clean up pull request
Diffstat (limited to 'lib/Net/Riak/Role/UserAgent.pm')
-rw-r--r--lib/Net/Riak/Role/UserAgent.pm53
1 files changed, 14 insertions, 39 deletions
diff --git a/lib/Net/Riak/Role/UserAgent.pm b/lib/Net/Riak/Role/UserAgent.pm
index c736f0a..63808eb 100644
--- a/lib/Net/Riak/Role/UserAgent.pm
+++ b/lib/Net/Riak/Role/UserAgent.pm
@@ -23,7 +23,7 @@ has ua_timeout => (
has ssl_opts => (
is => 'rw',
- isa => 'HashRef'
+ isa => 'HashRef'
);
has useragent => (
@@ -38,19 +38,19 @@ has useragent => (
my %opts = @LWP::Protocol::http::EXTRA_SOCK_OPTS;
$opts{MaxLineLength} = 65_536;
@LWP::Protocol::http::EXTRA_SOCK_OPTS = %opts;
- my $ua = undef;
-
- if ( !$self->ssl ) {
- $ua = LWP::UserAgent->new(
- timeout => $self->ua_timeout,
- keep_alive => 1,
- );
- } else {
- $ua = LWP::UserAgent->new(
- timeout => $self->ua_timeout,
- keep_alive => 1,
- ssl_opts => $self->ssl_opts
- );
+ my $ua = undef;
+
+ if ( !$self->ssl ) {
+ $ua = LWP::UserAgent->new(
+ timeout => $self->ua_timeout,
+ keep_alive => 1,
+ );
+ } else {
+ $ua = LWP::UserAgent->new(
+ timeout => $self->ua_timeout,
+ keep_alive => 1,
+ ssl_opts => $self->ssl_opts
+ );
}
$ua->conn_cache(__PACKAGE__->connection_cache);
@@ -60,28 +60,3 @@ has useragent => (
);
1;
-
-__END__
-=pod
-
-=head1 NAME
-
-Net::Riak::Role::UserAgent - useragent for Net::Riak
-
-=head1 VERSION
-
-version 0.1600
-
-=head1 AUTHOR
-
-franck cuny <franck@lumberjaph.net>, robin edwards <robin.ge@gmail.com>
-
-=head1 COPYRIGHT AND LICENSE
-
-This software is copyright (c) 2011 by linkfluence.
-
-This is free software; you can redistribute it and/or modify it under
-the same terms as the Perl 5 programming language system itself.
-
-=cut
-