File Coverage

_build/lib/MyModuleBuilder.pm
Criterion Covered Total %
statement 6 17 35.2
branch 0 4 0.0
condition n/a
subroutine 2 4 50.0
pod 0 1 0.0
total 8 26 30.7


line stmt bran cond sub pod time code
1             package MyModuleBuilder;
2 1     1   508 use Module::Build;
  1         75583  
  1         43  
3             our @ISA = qw(Module::Build);
4              
5 1     1   8 use Cwd qw( cwd );
  1         2  
  1         288  
6              
7             #---------------------------------
8             # Build
9             #---------------------------------
10              
11             sub ACTION_build {
12 0     0 0   my ($s) = @_;
13 0           $s->_readme();
14 0           $s->SUPER::ACTION_build;
15             }
16              
17             # Only for the maintainer on "Build build".
18             sub _readme {
19 0     0     my ($s) = @_;
20 0 0         return if cwd() !~ m{ / git / perlmy / [^/]+ $ }x;
21              
22             my ($installed) =
23 0           grep { -x "$_/pod2markdown" }
24 0           split /:/, $ENV{PATH};
25 0 0         return if !$installed;
26              
27 0           print "Building README\n";
28 0           my $lib = $s->{properties}{dist_version_from};
29 0           system "pod2markdown $lib > README.md";
30             }
31              
32            
33             1;