| 1 | package builder::MyBuilder; | ||||||||||||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | 1 | ▶ | use base "Module::Build"; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 1 | ▶ | use Cwd qw(getcwd); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 1 | ▶ | use File::Spec; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 1 | my $DISCOUNT_VERSION = "3.0.2.0"; | |||||||||||||||||||
| 10 | 1 | my $DISCOUNT_DIR = "discount-$DISCOUNT_VERSION"; | |||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 13 | 0 | my ($class, %argv) = @_; | |||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 0 | $class->SUPER::new( | |||||||||||||||||||
| 16 | %argv, | ||||||||||||||||||||
| 17 | needs_compiler => 1, | ||||||||||||||||||||
| 18 | include_dirs => [$DISCOUNT_DIR], | ||||||||||||||||||||
| 19 | ); | ||||||||||||||||||||
| 20 | } | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | 1 | ▶ | sub _build_discount { | ||||||||||||||||||
|
Subroutine
_build_discount: called CC=5 SCAR=17.4
| |||||||||||||||||||||
| 23 | 1 | my $self = shift; | |||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 1 | my $cwd = getcwd(); | |||||||||||||||||||
| 26 | 1 | ▶ | chdir $DISCOUNT_DIR or die "chdir $DISCOUNT_DIR: $!"; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 27 | 1 | my $ok = do { | |||||||||||||||||||
| 28 | 1 | local $ENV{CC} = $self->config("cc") . " -fPIC"; | |||||||||||||||||||
| 29 | 1 | $self->do_system("sh", "configure.sh"); | |||||||||||||||||||
| 30 | }; | ||||||||||||||||||||
| 31 | 1 | ▶ | $ok &&= $self->do_system($self->config("make"), "clean"); | ||||||||||||||||||
|
Condition33%1/3
$ok &&= $self->do_system($self->config("make"), "clean")
MC/DC0%0/2
$ok &&= $self->do_system($self->config("make"), "clean")
$ok
$self->do_system($self->config("make"), "clean")
Truth table33%1/3
A &&= B
A= $okB= $self->do_system($self->config("make"), "clean")
| |||||||||||||||||||||
| 32 | 1 | ▶ | $ok &&= $self->do_system($self->config("make"), "libmarkdown"); | ||||||||||||||||||
|
Condition33%1/3
$ok &&= $self->do_system($self->config("make"), "libmarkdown")
MC/DC0%0/2
$ok &&= $self->do_system($self->config("make"), "libmarkdown")
$ok
$self->do_system($self->config("make"), "libmarkdown")
Truth table33%1/3
A &&= B
A= $okB= $self->do_system($self->config("make"), "libmarkdown")
| |||||||||||||||||||||
| 33 | 1 | ▶ | chdir $cwd or die "chdir $cwd: $!"; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 34 | 1 | $ok; | |||||||||||||||||||
| 35 | } | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 1 | ▶ | sub ACTION_code { | ||||||||||||||||||
|
Subroutine
ACTION_code: called CC=3 SCAR=11.1
Pod
undocumented
| |||||||||||||||||||||
| 38 | 1 | my ($self, @argv) = @_; | |||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | 1 | my $spec = $self->_infer_xs_spec(File::Spec->catfile("lib", "Text", "Markdown", "Discount.xs")); | |||||||||||||||||||
| 41 | 1 | my $archive = File::Spec->catfile($DISCOUNT_DIR, "libmarkdown.a"); | |||||||||||||||||||
| 42 | my @sources = ( | ||||||||||||||||||||
| 43 | __FILE__, | ||||||||||||||||||||
| 44 | $spec->{lib_file}, | ||||||||||||||||||||
| 45 | 1 | grep { -f } glob(File::Spec->catfile($DISCOUNT_DIR, "*")), | |||||||||||||||||||
| 46 | ); | ||||||||||||||||||||
| 47 | 1 | ▶ | if (!$self->up_to_date(\@sources, $archive)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 48 | 1 | ▶ | $self->_build_discount or die; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 49 | } | ||||||||||||||||||||
| 50 | 1 | push @{$self->{properties}{objects}}, $archive; | |||||||||||||||||||
| 51 | 1 | $self->SUPER::ACTION_code(@argv); | |||||||||||||||||||
| 52 | } | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | 1 | 1; | |||||||||||||||||||