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.3514_04'; # TRIAL
4             $HTTP::Tiny::NoProxy::VERSION = '1.351404';
5 26     26   239850 use base 'HTTP::Tiny';
  26         81  
  26         15481  
6              
7             # Simple subclass of HTTP::Tiny, adding the no_proxy argument, because we're
8             # talking to 127.0.0.1 and it makes no sense to use a proxy for that - and
9             # causes lots of cpantesters failures on any boxes that have proxy env vars set.
10             #
11             # See https://github.com/chansen/p5-http-tiny/pull/118 for a PR I raised for
12             # HTTP::Tiny to automatically ignore proxy settings for 127.0.0.1/localhost.
13              
14              
15             sub new {
16 47     47 1 2629467 my ($self, %args) = @_;
17              
18 47         1104 $args{no_proxy} = [127.0.0.1, 127.0.0.11];
19              
20 47         1828 return $self->SUPER::new(%args);
21             }
22              
23              
24             1;
25              
26             __END__