| 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 | 1 | ▶ | use base qw(Module::Build::XSUtil); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use Devel::PPPort 3.59; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 9 | 0 | my ($class, %args) = @_; | |||||||||
| 10 | 0 | $class->SUPER::new( | |||||||||
| 11 | %args, | ||||||||||
| 12 | c_source => [ 'xs-src' ], | ||||||||||
| 13 | generate_ppport_h => 'xs-src/ppport.h', | ||||||||||
| 14 | generate_xshelper_h => 'xs-src/xshelper.h', | ||||||||||
| 15 | xs_files => { 'xs-src/Mouse.xs' => 'lib/Mouse.xs' }, | ||||||||||
| 16 | ); | ||||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 1 | ▶ | sub ACTION_code { | ||||||||
|
Subroutine
ACTION_code: called CC=5 SCAR=16.8
Pod
undocumented
| |||||||||||
| 20 | 1 | my ($self, @args) = @_; | |||||||||
| 21 | |||||||||||
| 22 | 1 | ▶ | $self->run_perl_script('tool/generate-mouse-tiny.pl', [], ['lib/Mouse/Tiny.pm']) or die; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | |||||||||||
| 24 | 1 | ▶ | if (!$self->pureperl_only) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 1 | $self->_write_xs_version; | |||||||||
| 26 | 1 | my @xs = qw( | |||||||||
| 27 | xs-src/MouseAccessor.xs | ||||||||||
| 28 | xs-src/MouseAttribute.xs | ||||||||||
| 29 | xs-src/MouseTypeConstraints.xs | ||||||||||
| 30 | xs-src/MouseUtil.xs | ||||||||||
| 31 | ); | ||||||||||
| 32 | 1 | for my $xs (@xs) { | |||||||||
| 33 | 4 | (my $c = $xs) =~ s/\.xs\z/.c/; | |||||||||
| 34 | 4 | ▶ | next if $self->up_to_date($xs, $c); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 0 | $self->compile_xs($xs, outfile => $c); | |||||||||
| 36 | } | ||||||||||
| 37 | } | ||||||||||
| 38 | 1 | $self->SUPER::ACTION_code(@args); | |||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 1 | ▶ | sub _write_xs_version { | ||||||||
|
Subroutine
_write_xs_version: called CC=2 SCAR=7.0
| |||||||||||
| 42 | 1 | my $self = shift; | |||||||||
| 43 | 1 | ▶ | open my $fh, '>', 'xs-src/xs_version.h' or die; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 44 | 1 | print {$fh} "#ifndef XS_VERSION\n"; | |||||||||
| 45 | 1 | printf {$fh} "#define XS_VERSION \"%s\"\n", $self->dist_version; | |||||||||
| 46 | 1 | print {$fh} "#endif\n"; | |||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | 1 | ▶ | sub ACTION_test { | ||||||||
|
Subroutine
ACTION_test: called CC=3 SCAR=13.6
Pod
undocumented
| |||||||||||
| 50 | 1 | my ($self, @args) = @_; | |||||||||
| 51 | |||||||||||
| 52 | 1 | ▶ | if ($ENV{COMPAT_TEST}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 53 | 0 | $self->depends_on('moose_compat_test'); | |||||||||
| 54 | } | ||||||||||
| 55 | |||||||||||
| 56 | 1 | ▶ | if (!$self->pureperl_only) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 57 | 1 | local $ENV{MOUSE_XS} = 1; | |||||||||
| 58 | 1 | $self->log_info("xs tests.\n"); | |||||||||
| 59 | 1 | $self->SUPER::ACTION_test(@args); | |||||||||
| 60 | } | ||||||||||
| 61 | |||||||||||
| 62 | { | ||||||||||
| 63 | 0 | local $ENV{PERL_ONLY} = 1; | |||||||||
| 64 | 0 | $self->log_info("pureperl tests.\n"); | |||||||||
| 65 | 0 | $self->SUPER::ACTION_test(@args); | |||||||||
| 66 | } | ||||||||||
| 67 | } | ||||||||||
| 68 | |||||||||||
| 69 | 0 | ▶ | sub ACTION_moose_compat_test { | ||||||||
|
Subroutine
ACTION_moose_compat_test: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 70 | 0 | my $self = shift; | |||||||||
| 71 | 0 | $self->depends_on('code'); | |||||||||
| 72 | 0 | ▶ | $self->run_perl_script('tool/create-moose-compatibility-tests.pl') or die; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 73 | } | ||||||||||
| 74 | |||||||||||
| 75 | 1 | 1; | |||||||||