Subject: | Cannot use http_proxy env variable |
Hello
CPAN::Uploader provides only one way to specify a proxy: through the
constructor. This makes it hard to use from Dist::Zilla. Expecially if
developement is done sometimes from work (proxy required) and sometimes
from home (no proxy).
In my case, the best way to handle proxy is through http_proxy
environment variable. This can be done with the following patch
(succesfully tested by releasing Config::Model 1.204 with dzil).
All the best
--- Uploader.pm~ 2010-05-07 04:48:40.000000000 +0200
+++ Uploader.pm 2010-06-03 13:07:20.000000000 +0200
@@ -52,6 +52,7 @@
$agent->agent($self . q{/} . $self->VERSION);
$agent->proxy(http => $self->{http_proxy}) if $self->{http_proxy};
+ $agent->env_proxy;
my $request = POST(
$PAUSE_ADD_URI,