File Coverage

blib/lib/HTTP/Tiny/NoProxy.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod 1 1 100.0
total 9 9 100.0


line stmt bran cond sub pod time code
1             package HTTP::Tiny::NoProxy;
2             our $AUTHORITY = 'cpan:SUKRIA';
3             $HTTP::Tiny::NoProxy::VERSION = '1.3520';
4 26     26   302251 use base 'HTTP::Tiny';
  26         133  
  26         19689  
5              
6             # Simple subclass of HTTP::Tiny, adding the no_proxy argument, because we're
7             # talking to 127.0.0.1 and it makes no sense to use a proxy for that - and
8             # causes lots of cpantesters failures on any boxes that have proxy env vars set.
9             #
10             # See https://github.com/chansen/p5-http-tiny/pull/118 for a PR I raised for
11             # HTTP::Tiny to automatically ignore proxy settings for 127.0.0.1/localhost.
12              
13              
14             sub new {
15 47     47 1 3315154 my ($self, %args) = @_;
16              
17 47         1563 $args{no_proxy} = [127.0.0.1, 127.0.0.11];
18              
19 47         2452 return $self->SUPER::new(%args);
20             }
21              
22              
23             1;
24              
25             __END__