| 1 | package Web::ID::Util::FindOpenSSL; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 1 | our $AUTHORITY = "cpan:TOBYINK"; | |||||||||||||||||||||||||||
| 4 | 1 | our $VERSION = "1.927"; | |||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use File::ShareDir qw/dist_dir/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use File::Spec; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | 1 | my @possible = ( | |||||||||||||||||||||||||||
| 11 | 'c:\\openssl\\bin\\openssl.exe', | ||||||||||||||||||||||||||||
| 12 | '/usr/bin/openssl', | ||||||||||||||||||||||||||||
| 13 | '/usr/local/bin/openssl', | ||||||||||||||||||||||||||||
| 14 | ); | ||||||||||||||||||||||||||||
| 15 | 1 | ▶ | push @possible, $ENV{OPENSSL_PATH} if exists $ENV{OPENSSL_PATH}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | push @possible, File::Spec->catfile( | ||||||||||||||||||||||||||||
| 17 | dist_dir("Alien-OpenSSL"), | ||||||||||||||||||||||||||||
| 18 | "bin", | ||||||||||||||||||||||||||||
| 19 | "openssl", | ||||||||||||||||||||||||||||
| 20 | 1 | ▶ | ) if eval { dist_dir("Alien-OpenSSL") }; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 1 | my $openssl; | |||||||||||||||||||||||||||
| 23 | sub find_openssl | ||||||||||||||||||||||||||||
| 24 | 6 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
find_openssl: called CC=5 SCAR=16.4
Pod
undocumented
| |||||||||||||||||||||||||||||
| 25 | 6 | ▶ | return $openssl | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
defined $openssl and -f $openssl
MC/DC50%1/2
defined $openssl and -f $openssl
defined $openssl
-f $openssl
Truth table66%2/3
A and B
A= defined $opensslB= -f $openssl
| |||||||||||||||||||||||||||||
| 26 | if defined $openssl && -f $openssl; | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | 1 | for my $try (@possible) | |||||||||||||||||||||||||||
| 29 | { | ||||||||||||||||||||||||||||
| 30 | 2 | ▶ | return ($openssl = $try) if -f $try; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 0 | return; | |||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | 1 | 1; | |||||||||||||||||||||||||||