« blib/lib/Lemonldap/NG/Common/EmailAddress.pm
↑ Summary
blib/lib/Lemonldap/NG/Common/Apache/Session/Generate/SHA256.pm »
| 1 | package Lemonldap::NG::Common::UserAgent; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 3 | ▶ | use LWP::UserAgent; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | 3 | ▶ | use Lemonldap::NG::Common; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | 3 | our $VERSION = '2.18.0'; | |||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 17 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=4 SCAR=13.9
Pod
undocumented
| |||||||||||||||||||||
| 10 | 17 | my ( $class, $conf ) = @_; | |||||||||||||||||||
| 11 | 17 | ▶ | my $opts = $conf->{lwpOpts} || {}; | ||||||||||||||||||
|
Condition100%2/2
$conf->{'lwpOpts'} || {}
MC/DC100%1/1
$conf->{'lwpOpts'} || {}
$conf->{'lwpOpts'}
Truth table100%2/2
A
A= $conf->{'lwpOpts'}
| |||||||||||||||||||||
| 12 | 17 | my $agent = "LemonLDAP-NG/" . $Lemonldap::NG::Common::VERSION . " "; | |||||||||||||||||||
| 13 | 17 | ▶ | $opts->{agent} ||= $agent; | ||||||||||||||||||
|
Condition66%2/3
$opts->{"agent"} ||= $agent
MC/DC0%0/2
$opts->{"agent"} ||= $agent
$opts->{"agent"}
$agent
Truth table66%2/3
A ||= B
A= $opts->{"agent"}B= $agent
| |||||||||||||||||||||
| 14 | 17 | ▶ | $opts->{ssl_opts} = $conf->{lwpSslOpts} if ( $conf->{lwpSslOpts} ); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 15 | 17 | my $ua = LWP::UserAgent->new(%$opts); | |||||||||||||||||||
| 16 | 17 | push @{ $ua->requests_redirectable }, 'POST'; | |||||||||||||||||||
| 17 | 17 | return $ua; | |||||||||||||||||||
| 18 | } | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 3 | 1; | |||||||||||||||||||