Permalink
Browse files

Make $self->ua use proxies when available

Having a hard time coding on the move, but curiously I can still use my
IPv6 proxy (even over teredo...)

Signed-off-by: Zak B. Elep <zakame@cpan.org>
  • Loading branch information...
1 parent 2491df6 commit 792f346150d9a7b1006a4bf856d8d34055a7b593 @zakame committed Oct 2, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Google/Plus.pm
View
@@ -48,7 +48,7 @@ sub new {
croak "API key required" unless $_[0] and $_[0] eq 'key';
$self->key($_[1]);
- $self->ua(Mojo::UserAgent->new);
+ $self->ua(Mojo::UserAgent->new->detect_proxy);
$self;
}
@@ -141,7 +141,9 @@ Google+ API key, used for retrieving content. Usually set using L</new>.
my $ua = $plus->ua(Mojo::UserAgent->new);
User agent object that retrieves JSON from the Google+ API endpoint.
-Defaults to a L<Mojo::UserAgent> object.
+Defaults to a L<Mojo::UserAgent> object. This object will use
+HTTP/HTTPS proxies when available (via C<HTTP_PROXY> and C<HTTPS_PROXY>
+environment variables.)
=head1 METHODS

0 comments on commit 792f346

Please sign in to comment.