| 1 | package MyModuleBuilder; | ||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use Module::Build; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 3 | 1 | our @ISA = qw(Module::Build); | |||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 1 | require Cwd; | |||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | #--------------------------------- | ||||||||||||||||||||||||||||
| 8 | # Build | ||||||||||||||||||||||||||||
| 9 | #--------------------------------- | ||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | sub ACTION_build { | ||||||||||||||||||||||||||||
| 12 | 0 | ▶ | my ($s) = @_; | ||||||||||||||||||||||||||
|
Subroutine
ACTION_build: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | # Only for the maintainer on "Build build". | ||||||||||||||||||||||||||||
| 15 | 0 | ▶ | if ( $^V >= v5.30.0 ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 16 | 0 | ▶ | if ( Cwd::cwd() =~ m{ / git / perlmy / [^/]+ $ }x ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 17 | 0 | $s->_update_logo_version(); | |||||||||||||||||||||||||||
| 18 | 0 | $s->_build_readme(); | |||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 0 | $s->SUPER::ACTION_build; | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | sub _update_logo_version { | ||||||||||||||||||||||||||||
| 26 | 0 | ▶ | my ($s) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_update_logo_version: not called CC=4 SCAR=30.0
| |||||||||||||||||||||||||||||
| 27 | 0 | print "Updating logo ...\n"; | |||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | 0 | require lib; | |||||||||||||||||||||||||||
| 30 | 0 | lib->import("lib"); | |||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 0 | require e; | |||||||||||||||||||||||||||
| 33 | 0 | e->import(); | |||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 0 | @ARGV = ( "lib/e.pm" ); | |||||||||||||||||||||||||||
| 36 | 0 | local $^I = ""; | |||||||||||||||||||||||||||
| 37 | 0 | local $\ = "\n"; | |||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 0 | ▶ | while (<ARGV>) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 40 | 0 | chomp; | |||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 0 | my $n = | |||||||||||||||||||||||||||
| 43 | / unleashed /x ... | ||||||||||||||||||||||||||||
| 44 | / ^ =head1 \s+ NAME /x; | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | 0 | ▶ | next unless $n and $n == 2; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$n and $n == 2
MC/DC0%0/2
$n and $n == 2
$n
$n == 2
Truth table0%0/3
A and B
A= $nB= $n == 2
| |||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | 0 | s/ v \K \S+ /$e::VERSION/xg; | |||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||
| 50 | continue { | ||||||||||||||||||||||||||||
| 51 | 0 | print; | |||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | sub _build_readme { | ||||||||||||||||||||||||||||
| 56 | 0 | ▶ | my ($s) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_build_readme: not called CC=2 SCAR=17.9
| |||||||||||||||||||||||||||||
| 57 | my ($installed) = | ||||||||||||||||||||||||||||
| 58 | 0 | grep { -x "$_/pod2markdown" } | |||||||||||||||||||||||||||
| 59 | 0 | split /:/, $ENV{PATH}; | |||||||||||||||||||||||||||
| 60 | 0 | ▶ | return if !$installed; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | 0 | print "Building README ...\n"; | |||||||||||||||||||||||||||
| 63 | 0 | my $lib = $s->{properties}{dist_version_from}; | |||||||||||||||||||||||||||
| 64 | 0 | system "pod2markdown $lib > README.md"; | |||||||||||||||||||||||||||
| 65 | } | ||||||||||||||||||||||||||||
| 66 | #--------------------------------- | ||||||||||||||||||||||||||||
| 67 | # Install | ||||||||||||||||||||||||||||
| 68 | #--------------------------------- | ||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | sub ACTION_install { | ||||||||||||||||||||||||||||
| 71 | 0 | ▶ | my ($s) = @_; | ||||||||||||||||||||||||||
|
Subroutine
ACTION_install: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 72 | 0 | $s->SUPER::ACTION_install; | |||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | # Display logo/image. | ||||||||||||||||||||||||||||
| 75 | 0 | system qq( pod e -q head1=LOGO/Verbatim ); | |||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||
| 78 | 1 | 1; | |||||||||||||||||||||||||||