| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package MyModuleBuilder; |
|
2
|
1
|
|
|
1
|
|
776
|
use Module::Build; |
|
|
1
|
|
|
|
|
107728
|
|
|
|
1
|
|
|
|
|
429
|
|
|
3
|
|
|
|
|
|
|
our @ISA = qw(Module::Build); |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
require Cwd; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#--------------------------------- |
|
8
|
|
|
|
|
|
|
# Build |
|
9
|
|
|
|
|
|
|
#--------------------------------- |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub ACTION_build { |
|
12
|
0
|
|
|
0
|
0
|
|
my ($s) = @_; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Only for the maintainer on "Build build". |
|
15
|
0
|
0
|
|
|
|
|
if ( $^V >= v5.30.0 ) { |
|
16
|
0
|
0
|
|
|
|
|
if ( Cwd::cwd() =~ m{ / git / perlmy / [^/]+ $ }x ) { |
|
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
|
|
|
0
|
|
|
my ($s) = @_; |
|
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 () { |
|
40
|
0
|
|
|
|
|
|
chomp; |
|
41
|
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
my $n = |
|
43
|
|
|
|
|
|
|
/ unleashed /x ... |
|
44
|
|
|
|
|
|
|
/ ^ =head1 \s+ NAME /x; |
|
45
|
|
|
|
|
|
|
|
|
46
|
0
|
0
|
0
|
|
|
|
next unless $n and $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
|
|
|
0
|
|
|
my ($s) = @_; |
|
57
|
|
|
|
|
|
|
my ($installed) = |
|
58
|
0
|
|
|
|
|
|
grep { -x "$_/pod2markdown" } |
|
59
|
0
|
|
|
|
|
|
split /:/, $ENV{PATH}; |
|
60
|
0
|
0
|
|
|
|
|
return if !$installed; |
|
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
|
|
|
0
|
0
|
|
my ($s) = @_; |
|
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; |