blib/lib/auto/share/dist/Amon2/flavor/Minimum/builder/MyBuilder.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 35 CC 3 SCAR 17.5
CC
3
Cov
0%
ACTION_code
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 5.8
1 package builder::MyBuilder;
2 use strict;
3 use warnings;
4 use utf8;
5 use 5.008_001;
6 use parent qw(Module::Build);
7  
8 # Module:::Build's share_dir handling is not good for me.
9 # We need to install 'tmpl' directories to '$DIST_DIR/tmpl'. But M::B doesn't support it.
10 sub ACTION_code {
11 my $self = shift;
12 my $share_prefix = File::Spec->catdir($self->blib, qw/lib auto share dist/, '<% $dist %>');
13 for my $dir (qw(tmpl static)) {
14 next unless -d $dir;
15 for my $src (@{$self->rscan_dir($dir)}) {
16 next if -d $src;
17 $self->copy_if_modified(
18 from => $src,
19 to_dir => File::Spec->catfile( $share_prefix )
20 );
21 }
22 }
23 $self->SUPER::ACTION_code();
24 }
25  
26 1;