File Coverage

blib/lib/Module/Setup/Plugin/Test/Makefile.pm
Criterion Covered Total %
statement 17 17 100.0
branch 10 10 100.0
condition n/a
subroutine 5 5 100.0
pod 1 2 50.0
total 33 34 97.0


line stmt bran cond sub pod time code
1             package Module::Setup::Plugin::Test::Makefile;
2 21     21   156 use strict;
  21         52  
  21         1054  
3 21     21   233 use warnings;
  21         46  
  21         829  
4 21     21   125 use base 'Module::Setup::Plugin';
  21         46  
  21         10345  
5              
6             sub register {
7 78     78 0 211 my($self, ) = @_;
8 78         461 $self->add_trigger( check_skeleton_directory => \&check_skeleton_directory );
9             }
10              
11             sub check_skeleton_directory {
12 42     42 1 1777 my $self = shift;
13 42 100       282 return unless $self->dialog("Check Makefile.PL? [Yn] ", 'y') =~ /[Yy]/;
14              
15 5 100       93 !$self->system('perl', 'Makefile.PL') or die $?;
16 4 100       45 !$self->system('make', 'test') or die $?;
17 3 100       32 !$self->system('make', 'manifest') or die $?;
18 2 100       26 !$self->system('make', 'distclean') or die $?;
19             }
20              
21             1;