Subject: | [PATCH] add support for http proxy |
It would be nice if perlbrew worked behind a proxy server. The attached
patch does just that by checking for, and using, $ENV{http_proxy}.
Subject: | 0001-add-support-for-http-proxy.patch |
From 87d64e54460f97c76698e71e0ab8b58a16dbd4ec Mon Sep 17 00:00:00 2001
From: Iain Arnell <iarnell@gmail.com>
Date: Wed, 2 Jun 2010 07:32:10 +0200
Subject: [PATCH] add support for http proxy
if $ENV{http_proxy} is set, use it to configure HTTP::Lite
---
lib/App/perlbrew.pm | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/App/perlbrew.pm b/lib/App/perlbrew.pm
index 66961b1..fcb7dca 100644
--- a/lib/App/perlbrew.pm
+++ b/lib/App/perlbrew.pm
@@ -160,6 +160,7 @@ HELP
my $http_get = sub {
my ($url, $cb) = @_;
my $ua = HTTP::Lite->new;
+ $ua->proxy($ENV{http_proxy}) if $ENV{http_proxy};
my $loc = $url;
my $status = $ua->request($loc) or die "Fail to get $loc";
--
1.7.0.1