| 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
| |||||||||||||||
| 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
| |||||||||||||||
| 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
| |||||||||||||||
| 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__ | ||||||||||||||