Protocol/https/hosts.pm

filter: Statementstmt 68.4% 13 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 1 totaltotal 60.7% 17 / 28 CC 2 SCAR 9.4
CC
2
Cov
62%
_extra_sock_opts
6.0
socket_class
2.0
BEGIN
1.0
CRAP 2.6
« UserAgent/DNS/Hosts.pm ↑ Summary Protocol/http/hosts.pm »
1 package LWP::Protocol::https::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::https';
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 0 ▶sub _extra_sock_opts {
Subroutine _extra_sock_opts: not called CC=2 SCAR=17.9
9 0 my ($self, $host, $port) = @_;
10  
11 0 my @opts = $self->SUPER::_extra_sock_opts($host, $port);
12 0 ▶ 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)) 0 0 0
13 0 push @opts, (
14 PeerAddr => $peer_addr,
15 Host => $host,
16 SSL_verifycn_name => $host,
17 SSL_hostname => $host, # for SNI
18 );
19 }
20  
21 0 return @opts;
22 }
23  
24 0 ▶sub socket_class { 'LWP::Protocol::https::Socket' }
Subroutine socket_class: not called CC=1 SCAR=6.9
Pod undocumented
25  
26 1 1;
27  
28 __END__
« UserAgent/DNS/Hosts.pm ↑ Summary Protocol/http/hosts.pm »