| 1 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 2 | package Siesta::Build; | ||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use Module::Build; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use File::Find qw(find); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use IO::File; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use base 'Module::Build'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 2 | ▶ | use vars qw/$FAKE/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 0 | ▶ | sub create_build_script { | ||||||||||||||||||||||||||
|
Subroutine
create_build_script: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||
| 10 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 11 | 0 | $self->SUPER::create_build_script; | |||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | # check for incompatible steps | ||||||||||||||||||||||||||||
| 14 | 0 | my $module = $self->{properties}{module_name}; | |||||||||||||||||||||||||||
| 15 | 0 | ▶ | if (my $version = $self->check_installed_version($module, 0)) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | 0 | print "Upgrading from $module $version\n"; | |||||||||||||||||||||||||||
| 17 | 0 | my $fh = IO::File->new('Changes'); | |||||||||||||||||||||||||||
| 18 | 0 | my $chunk = ''; | |||||||||||||||||||||||||||
| 19 | 0 | my $this; | |||||||||||||||||||||||||||
| 20 | 0 | ▶ | while (<$fh>) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 21 | 0 | ▶ | if (/^(\S+)/) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 22 | 0 | ▶ | print "Incompatible change introduced in version $this:\n", $chunk | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 23 | if $chunk =~ /INCOMPATIBLE/; | ||||||||||||||||||||||||||||
| 24 | 0 | $this = $1; | |||||||||||||||||||||||||||
| 25 | 0 | ▶ | last if $self->check_installed_version( $module, $this ); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 26 | 0 | $chunk = ''; | |||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||
| 28 | 0 | $chunk .= $_; | |||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | } | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | 0 | ▶ | sub ACTION_install { | ||||||||||||||||||||||||||
|
Subroutine
ACTION_install: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 34 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 35 | 0 | $self->SUPER::ACTION_install; | |||||||||||||||||||||||||||
| 36 | 0 | $self->ACTION_install_extras; | |||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 0 | ▶ | sub ACTION_fakeinstall { | ||||||||||||||||||||||||||
|
Subroutine
ACTION_fakeinstall: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 40 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 41 | 0 | $self->SUPER::ACTION_fakeinstall; | |||||||||||||||||||||||||||
| 42 | 0 | local $FAKE = 1; | |||||||||||||||||||||||||||
| 43 | 0 | $self->ACTION_install_extras; | |||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | 0 | ▶ | sub ACTION_install_extras { | ||||||||||||||||||||||||||
|
Subroutine
ACTION_install_extras: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 47 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 48 | 0 | my $path = $self->{config}{__extras_destination}; | |||||||||||||||||||||||||||
| 49 | 0 | my @files = $self->_find_extras; | |||||||||||||||||||||||||||
| 50 | 0 | print "installing extras to $path\n"; | |||||||||||||||||||||||||||
| 51 | 0 | for (@files) { | |||||||||||||||||||||||||||
| 52 | 0 | ▶ | $FAKE | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 53 | ? print "$_ -> $path/$_ (FAKE)\n" | ||||||||||||||||||||||||||||
| 54 | : $self->copy_if_modified($_, $path); | ||||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||
| 56 | } | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | 0 | ▶ | sub ACTION_cover { | ||||||||||||||||||||||||||
|
Subroutine
ACTION_cover: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 59 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 60 | 0 | $self->depends_on('build'); | |||||||||||||||||||||||||||
| 61 | 0 | system qw( cover -delete ); | |||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | # sometimes we get failing tests, which makes Test::Harness | ||||||||||||||||||||||||||||
| 64 | # die. catch that | ||||||||||||||||||||||||||||
| 65 | 0 | eval { | |||||||||||||||||||||||||||
| 66 | 0 | local $ENV{PERL5OPT} = "-MDevel::Cover=-summary,0"; | |||||||||||||||||||||||||||
| 67 | 0 | $self->ACTION_test(@_); | |||||||||||||||||||||||||||
| 68 | }; | ||||||||||||||||||||||||||||
| 69 | 0 | system qw( cover -report html ); | |||||||||||||||||||||||||||
| 70 | } | ||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | 0 | ▶ | sub _find_extras { | ||||||||||||||||||||||||||
|
Subroutine
_find_extras: not called CC=1 SCAR=6.9
| |||||||||||||||||||||||||||||
| 73 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 74 | 0 | my @files; | |||||||||||||||||||||||||||
| 75 | 0 | ▶ | find(sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||
| 76 | 0 | ▶ | $File::Find::prune = 1 if -d && /^\.svn$/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
-d $_ and /^\.svn$/
MC/DC0%0/2
-d $_ and /^\.svn$/
-d $_
/^\.svn$/
Truth table0%0/3
A and B
A= -d $_B= /^\.svn$/
| |||||||||||||||||||||||||||||
| 77 | 0 | ▶ | return if -d; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 78 | 0 | ▶ | return if /~$/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 79 | 0 | push @files, $File::Find::name; | |||||||||||||||||||||||||||
| 80 | 0 | }, @{ $self->{config}{__extras_from} }); | |||||||||||||||||||||||||||
| 81 | 0 | return @files; | |||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | 2 | 1; | |||||||||||||||||||||||||||