| 1 | 3 | ▶ | use 5.010001; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | package Mite::MakeMaker; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use Mite::Miteception -all; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 3 | our $AUTHORITY = 'cpan:TOBYINK'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 3 | our $VERSION = '0.013000'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 3 | ▶ | use File::Find; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 3 | ▶ | use autodie; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | package # hide from indexer | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | MY; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 2 | ▶ | sub top_targets { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
top_targets: called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
top_targets: not called CC=1 SCAR=1.2
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 0 | my $make = $self->SUPER::top_targets; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | # Hacky way to run the mite target before pm_to_blib. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | $make =~ s{(pure_all \s* ::? .*) (pm_to_blib)}{$1 mite $2}x; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | return $make; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 2 | ▶ | sub postamble { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
postamble: called CC=2 SCAR=10.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
postamble: not called CC=2 SCAR=10.5
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | ▶ | my $mite = $ENV{MITE} || 'mite'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition25%1/4
$ENV{'MITE'} || 'mite'
$ENV{'MITE'} || 'mite'
MC/DC0%0/1
$ENV{'MITE'} || 'mite'
$ENV{'MITE'}
MC/DC0%0/1
$ENV{'MITE'} || 'mite'
$ENV{'MITE'}
Truth table50%1/2
A
A= $ENV{'MITE'}
Truth table0%0/2
A
A= $ENV{'MITE'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | return sprintf <<'MAKE', $mite; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | MITE=%s | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | mite :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | - $(MITE) compile --exit-if-no-mite-dir --no-search-mite-dir | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | - $(ABSPERLRUN) -MMite::MakeMaker -e 'Mite::MakeMaker->fix_pm_to_blib(@ARGV);' lib $(INST_LIB) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | clean :: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | - $(MITE) clean --exit-if-no-mite-dir --no-search-mite-dir | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | MAKE | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 3 | signature_for fix_pm_to_blib => ( | |||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | pos => [ Path, Path ], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 1 | ▶ | sub fix_pm_to_blib { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
fix_pm_to_blib: called CC=1 SCAR=1.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | ▶ | my ( $self, $from_dir, $to_dir ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
fix_pm_to_blib: not called CC=1 SCAR=1.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | find({ | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 8 | ▶ | wanted => sub { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=14.9
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | # Not just the mite files, but also the mite shim. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | 0 | ▶ | return if -d $_ || !m{\.pm$}; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=14.9
Branch: 2 branches
Condition33%2/6
-d $_ or not /\.pm$/
-d $_ or not /\.pm$/
MC/DC50%1/2
-d $_ or not /\.pm$/
-d $_
not /\.pm$/
MC/DC0%0/2
-d $_ or not /\.pm$/
-d $_
not /\.pm$/
Truth table66%2/3
A or not(B)
A= -d $_B= not /\.pm$/
Truth table0%0/3
A or not(B)
A= -d $_B= not /\.pm$/
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | 0 | my $src = Path::Tiny::path($File::Find::name); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 0 | my $dst = change_parent_dir($from_dir, $to_dir, $src); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | 0 | say "Copying $src to $dst"; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | 0 | $dst->parent->mkpath; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | 0 | $src->copy($dst); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | }, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | no_chdir => 1 | |||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | }, $from_dir); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | 3 | signature_for change_parent_dir => ( | |||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | method => false, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | pos => [ Path, Path, Path ], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 6 | ▶ | sub change_parent_dir { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
change_parent_dir: called CC=1 SCAR=1.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | ▶ | my ( $old_parent, $new_parent, $file ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
change_parent_dir: not called CC=1 SCAR=1.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | return $new_parent->child( $file->relative($old_parent) ); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||