Protocol/http/hosts.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 96.4% 27 / 28 CC 2 SCAR 2.5
CC
2
Cov
100%
_extra_sock_opts
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Protocol/https/hosts.pm ↑ Summary
1 package LWP::Protocol::http::hosts;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use parent 'LWP::Protocol::http';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use LWP::UserAgent::DNS::Hosts;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 4 ▶sub _extra_sock_opts {
Subroutine _extra_sock_opts: called CC=2 SCAR=6.9
9 4 my ($self, $host, $port) = @_;
10  
11 4 my @opts = $self->SUPER::_extra_sock_opts($host, $port);
12 4 ▶ if (my $peer_addr = LWP::UserAgent::DNS::Hosts->_registered_peer_addr($host)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $peer_addr = "LWP::UserAgent::DNS::Hosts"->_registered_peer_addr($host)) 3 1 4
13 3 push @opts, (PeerAddr => $peer_addr, Host => $host);
14 }
15  
16 4 return @opts;
17 }
18  
19 4 ▶sub socket_class { 'LWP::Protocol::http::Socket' }
Subroutine socket_class: called CC=1 SCAR=0.0
Pod undocumented
20  
21 1 1;
22  
23 __END__
« Protocol/https/hosts.pm ↑ Summary