lib/Web/ID/Util/FindOpenSSL.pm

filter: Statementstmt 95.2% 20 / 21 Branchbran 75.0% 6 / 8 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 84.6% 33 / 39 CC 5 SCAR 12.8
CC
5
Cov
88%
find_openssl
5.2
BEGIN
1.0
BEGIN
1.0
CRAP 3.6
« blib/lib/Web/ID/SAN/Email.pm ↑ Summary blib/lib/Web/ID/RSAKey.pm »
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
BranchTrueFalseTotal
if exists $ENV{"OPENSSL_PATH"} 0 1 1
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
BranchTrueFalseTotal
if eval { do { dist_dir("Alien-OpenSSL") } } 0 1 1
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
BranchTrueFalseTotal
if defined $openssl and -f $openssl 5 1 6
Condition66%2/3
defined $openssl and -f $openssl
!ll&&!rl&&r
105
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
ABresult
0X0
100
111
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
BranchTrueFalseTotal
if -f $try 1 1 2
31 }
32
33 0 return;
34 }
35  
36 1 1;
« blib/lib/Web/ID/SAN/Email.pm ↑ Summary blib/lib/Web/ID/RSAKey.pm »