buildext/Alien/DBD/SQLite/BundledExtensions.pm

filter: Statementstmt 52.1% 12 / 23 Branchbran 25.0% 2 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 43.2% 16 / 37 CC 3 SCAR 14.7
CC
3
Cov
45%
get_build_commands
6.0
get_install_commands
6.0
BEGIN
1.0
CRAP 4.3
« blib/lib/DBD/SQLite/BundledExtensions/ConfigData.pm ↑ Summary blib/lib/DBD/SQLite/BundledExtensions/Install/Files.pm »
1 package Alien::DBD::SQLite::BundledExtensions;
2  
3 1 ▶use Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use File::ShareDir 'dist_dir';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION=0.002;
7 1 our @extensions = qw/spellfix csv ieee754 nextchar percentile series totype wholenumber eval/;
8  
9 1 my $dbd_dist = dist_dir('DBD-SQLite');
10 1 my $cc = $Config{cc};
11  
12 # TODO this probably doesn't work on windows anyway. Need to look into how to make that work correctly anyway.
13 1 ▶my $lib_ext = $^O =~ /mswin/i ? 'dll' :
Branch: 2 branches
BranchTrueFalseTotal
$^O =~ /mswin/i ? : 0 1 1
$^O =~ /darwin/i ? : 0 1 1
14 $^O =~ /darwin/i ? 'dylib' : 'so';
15  
16 # TODO this needs to support mswin32
17  
18  
19  
20 0 ▶sub get_build_commands {
Subroutine get_build_commands: not called CC=2 SCAR=17.9
Pod undocumented
21 0 ▶ my $shared = $^O =~ /darwin/i ? '-dynamiclib' : '-shared';
Branch: 1 branch
BranchTrueFalseTotal
$^O =~ /darwin/i ? : 0 0 0
22 0 my @build_commands = map {"$cc $shared -I$dbd_dist -O2 -fPIC -o $_.$lib_ext ext/misc/$_.c"} @extensions;
23  
24 0 return \@build_commands;
25 }
26  
27 0 ▶sub get_install_commands {
Subroutine get_install_commands: not called CC=2 SCAR=17.9
Pod undocumented
28 0 ▶ if ($^O =~ /mswin/i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O =~ /mswin/i) { } 0 0 0
29 0 my @install_commands = map {"copy $_.$lib_ext %DESTDIR%"} @extensions;
30  
31 0 return \@install_commands;
32 } else {
33 0 my @install_commands = map {"cp $_.$lib_ext %s"} @extensions;
34  
35 0 return \@install_commands;
36 }
37 }
38  
39 1 1;
40 __END__
« blib/lib/DBD/SQLite/BundledExtensions/ConfigData.pm ↑ Summary blib/lib/DBD/SQLite/BundledExtensions/Install/Files.pm »