buildext/Alien/DBD/SQLite/BundledExtensions.pm

filter: Statementstmt 60.0% 12 / 20 Branchbran 25.0% 2 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 47.0% 16 / 34 CC 3 SCAR 14.7
CC
3
Cov
50%
get_build_commands
6.0
get_install_commands
6.0
BEGIN
1.0
CRAP 4.3
« blib/lib/DBD/SQLite/BundledExtensions/ConfigData.pm ↑ Summary Build »
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/ ? 'dll' :
Branch: 2 branches
BranchTrueFalseTotal
$^O =~ /mswin/ ? : 0 1 1
$^O =~ /darwin/ ? : 0 1 1
14 $^O =~ /darwin/ ? 'dylib' : 'so';
15  
16 # TODO this needs to support mswin32
17  
18  
19  
20 sub get_build_commands {
21 0 ▶ my $shared = $^O =~ /darwin/ ? '-dynamiclib' : '-shared';
Subroutine get_build_commands: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
$^O =~ /darwin/ ? : 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 sub get_install_commands {
28 0 ▶ my $copy_cmd = $^O =~ /mswin/ ? 'copy' : 'cp';
Subroutine get_install_commands: not called CC=2 SCAR=17.9
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
$^O =~ /mswin/ ? : 0 0 0
29 0 my @install_commands = map {"$copy_cmd $_.$lib_ext %s"} @extensions;
30  
31 0 return \@install_commands;
32 }
33  
34 1 1;
35 __END__
« blib/lib/DBD/SQLite/BundledExtensions/ConfigData.pm ↑ Summary Build »