In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/3503e8484ba6399e51aec16d01278970f6a0ebe5?hp=d8fed09de8351f26e4a38b4b3018846227c7cc00>

- Log -----------------------------------------------------------------
commit 3503e8484ba6399e51aec16d01278970f6a0ebe5
Author: Chris 'BinGOs' Williams <[email protected]>
Date:   Fri Dec 12 12:22:58 2014 +0000

    Update HTTP-Tiny to CPAN version 0.053
    
      [DELTA]
    
    0.053     2014-12-11 23:42:17-05:00 America/New_York
    
        [FIXED]
    
        - Defended tests against HTTP_PROXY set in the environment
-----------------------------------------------------------------------

Summary of changes:
 Porting/Maintainers.pl          |  2 +-
 cpan/HTTP-Tiny/lib/HTTP/Tiny.pm |  4 ++--
 cpan/HTTP-Tiny/t/140_proxy.t    | 22 +++++++++++++---------
 cpan/HTTP-Tiny/t/Util.pm        |  3 +--
 4 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 1c5e312..d7b9fac 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -586,7 +586,7 @@ use File::Glob qw(:case);
     },
 
     'HTTP::Tiny' => {
-        'DISTRIBUTION' => 'DAGOLDEN/HTTP-Tiny-0.052.tar.gz',
+        'DISTRIBUTION' => 'DAGOLDEN/HTTP-Tiny-0.053.tar.gz',
         'FILES'        => q[cpan/HTTP-Tiny],
         'EXCLUDED'     => [
             't/00-report-prereqs.t',
diff --git a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
index 1a1e092..1276acc 100644
--- a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
+++ b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 # ABSTRACT: A small, simple, correct HTTP/1.1 client
 
-our $VERSION = '0.052';
+our $VERSION = '0.053';
 
 use Carp ();
 
@@ -1458,7 +1458,7 @@ HTTP::Tiny - A small, simple, correct HTTP/1.1 client
 
 =head1 VERSION
 
-version 0.052
+version 0.053
 
 =head1 SYNOPSIS
 
diff --git a/cpan/HTTP-Tiny/t/140_proxy.t b/cpan/HTTP-Tiny/t/140_proxy.t
index 2432fed..eda3d6f 100644
--- a/cpan/HTTP-Tiny/t/140_proxy.t
+++ b/cpan/HTTP-Tiny/t/140_proxy.t
@@ -6,13 +6,18 @@ use warnings;
 use File::Basename;
 use Test::More 0.88;
 
+use t::Util qw[ monkey_patch ];
 use HTTP::Tiny;
 
+BEGIN {
+    monkey_patch();
+}
+
+
 # Require a true value
 for my $proxy (undef, "", 0){
     local $ENV{all_proxy} = undef;
     local $ENV{ALL_PROXY} = undef;
-    local $ENV{HTTP_PROXY} = $proxy;
     local $ENV{http_proxy} = $proxy;
     my $c = HTTP::Tiny->new();
     ok(!defined $c->http_proxy);
@@ -50,19 +55,18 @@ for my $proxy ("http://localhost:8080/";, 
"http://localhost:8080";){
 }
 
 # case variations
-my @vars = map +(uc, lc), qw/http_proxy https_proxy all_proxy/;
-for my $var ( @vars ) {
+for my $var ( qw/http_proxy https_proxy all_proxy/ ) {
     my $proxy = "http://localhost:8080";;
-    local @ENV{@vars};
-    local $ENV{$var} = $proxy;
-    my $c = HTTP::Tiny->new();
-    my $m = ($var =~ /all/i) ? 'proxy' : lc($var);
-    is( $c->$m, $proxy, "set $m from $var" );
+    for my $s ( uc($var), lc($var) ) {
+        local $ENV{$s} = $proxy;
+        my $c = HTTP::Tiny->new();
+        my $m = ($s =~ /all/i) ? 'proxy' : lc($s);
+        is( $c->$m, $proxy, "set $m from $s" );
+    }
 }
 
 # ignore HTTP_PROXY with REQUEST_METHOD
 {
-    local $ENV{http_proxy};
     local $ENV{HTTP_PROXY} = "http://localhost:8080";;
     local $ENV{REQUEST_METHOD} = 'GET';
     my $c = HTTP::Tiny->new();
diff --git a/cpan/HTTP-Tiny/t/Util.pm b/cpan/HTTP-Tiny/t/Util.pm
index 717eaa7..448c031 100644
--- a/cpan/HTTP-Tiny/t/Util.pm
+++ b/cpan/HTTP-Tiny/t/Util.pm
@@ -169,8 +169,7 @@ sub sort_headers {
         *HTTP::Tiny::Handle::close = sub { 1 }; # don't close our temps
 
         # don't try to proxy in mock-mode
-        delete $ENV{$_}
-            for map { $_, uc($_) } qw/http_proxy https_proxy all_proxy/;
+        delete $ENV{$_} for map { $_, uc($_) } qw/http_proxy https_proxy 
all_proxy/;
     }
 }
 

--
Perl5 Master Repository

Reply via email to