builder/MyBuilder.pm

filter: Statementstmt 55.2% 21 / 38 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 87.5% 7 / 8 Podpod 0.0% 0 / 1 totaltotal 45.1% 28 / 62 CC 7 SCAR 33.5
CC
7
Cov
41%
new
56.0
BEGIN
1.0
BEGIN
1.0
CRAP 28.5
« blib/lib/Redis/Fast.pm ↑ Summary blib/lib/Redis/Fast/Sentinel.pm »
1 package builder::MyBuilder;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use 5.008005;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use base 'Module::Build::XSUtil';
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use File::Which qw(which);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Crypt::OpenSSL::Guess;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 0 ▶sub new {
Subroutine new: not called CC=7 SCAR=40.3
Pod undocumented
11 0 my ( $class, %args ) = @_;
12  
13 0 my $openssl_prefix = find_openssl_prefix();
14 0 my @openssl_ldflags = split(' ', openssl_lib_paths());
15  
16 0 my $self = $class->SUPER::new(
17 %args,
18 generate_ppport_h => 'src/ppport.h',
19 c_source => 'src',
20 xs_files => { './src/Redis__Fast.xs' => './lib/Redis/Fast.xs', },
21 include_dirs => ['src', 'deps/hiredis'],
22 extra_linker_flags => ["deps/hiredis/libhiredis$Config{lib_ext}", "deps/hiredis/libhiredis_ssl$Config{lib_ext}", @openssl_ldflags, "-lssl", "-lcrypto"],
23  
24 test_requires => {
25 "Digest::SHA" => "0",
26 "File::Temp" => "0",
27 "Parallel::ForkManager" => "0",
28 "Test::Deep" => "0",
29 "Test::Fatal" => "0",
30 "Test::LeakTrace" => "0",
31 "Test::More" => "0.98",
32 "Test::SharedFork" => "0",
33 "Test::TCP" => "0",
34 "Test::UNIXSock" => "0",
35 },
36 );
37  
38 0 my $make;
39 0 ▶ if ($^O =~ m/(bsd|dragonfly)$/ && $^O !~ m/gnukfreebsd$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O =~ /(bsd|dragonfly)$/ and not $^O =~ /gnukfreebsd$/) { } 0 0 0
Condition0%0/3
$^O =~ /(bsd|dragonfly)$/ and not $^O =~ /gnukfreebsd$/
!ll&&!rl&&r
000
MC/DC0%0/2
$^O =~ /(bsd|dragonfly)$/ and not $^O =~ /gnukfreebsd$/
$^O =~ /(bsd|dragonfly)$/ not $^O =~ /gnukfreebsd$/
Truth table0%0/3
A and not(B)
A= $^O =~ /(bsd|dragonfly)$/B= not $^O =~ /gnukfreebsd$/
ABresult
0X0
100
111
40 0 my $gmake = which('gmake');
41 0 ▶ unless (defined $gmake) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $gmake) 0 0 0
42 0 print "'gmake' is necessary for BSD platform.\n";
43 0 exit 0;
44 }
45 0 $make = $gmake;
46 } else {
47 0 $make = $Config{make};
48 }
49 0 ▶ if (-e '.git') {
Branch: 1 branch
BranchTrueFalseTotal
if (-e ".git") 0 0 0
50 0 ▶ unless (-e 'deps/hiredis/Makefile') {
Branch: 1 branch
BranchTrueFalseTotal
unless (-e "deps/hiredis/Makefile") 0 0 0
51 0 $self->do_system('git','submodule','update','--init');
52 }
53 }
54 0 ▶ $self->do_system($make, '-C', 'deps/hiredis', 'static', 'USE_SSL=1', ($openssl_prefix ? ("OPENSSL_PREFIX=$openssl_prefix") : ()));
Branch: 1 branch
BranchTrueFalseTotal
$openssl_prefix ? : 0 0 0
55 0 return $self;
56 }
57  
58 1 1;
« blib/lib/Redis/Fast.pm ↑ Summary blib/lib/Redis/Fast/Sentinel.pm »