| 1 | package OpenStack::MetaAPI::UserAgent; | ||||||||||||
| 2 | |||||||||||||
| 3 | 18 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 18 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 18 | ▶ | use parent 'LWP::UserAgent'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | # ABSTRACT: an LWP::UserAgent that leaves TLS hostname verification to LWP | ||||||||||||
| 9 | |||||||||||||
| 10 | 18 | our $VERSION = '0.005'; # VERSION: generated by DZP::OurPkgVersion | |||||||||||
| 11 | |||||||||||||
| 12 | 65 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 13 | 65 | my ($class, %opts) = @_; | |||||||||||
| 14 | |||||||||||||
| 15 | # A copy, so that the caller's hash keeps what it passed. | ||||||||||||
| 16 | 65 | ▶ | my %ssl_opts = %{$opts{ssl_opts} // {}}; | ||||||||||
|
Condition100%2/2
$opts{"ssl_opts"} // {}
MC/DC100%1/1
$opts{"ssl_opts"} // {}
$opts{"ssl_opts"}
Truth table100%2/2
A
A= $opts{"ssl_opts"}
| |||||||||||||
| 17 | 65 | delete $ssl_opts{verify_hostname}; | |||||||||||
| 18 | 65 | $opts{ssl_opts} = \%ssl_opts; | |||||||||||
| 19 | |||||||||||||
| 20 | 65 | return $class->SUPER::new(%opts); | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 18 | 1; | |||||||||||
| 24 | |||||||||||||
| 25 | __END__ | ||||||||||||