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 18     18   93 use strict;
  18         34  
  18         586  
3 18     18   87 use warnings;
  18         28  
  18         585  
4 18     18   93 use base 'Module::Setup::Plugin';
  18         27  
  18         3677  
5              
6             sub register {
7 72     72 0 129 my($self, ) = @_;
8 72         327 $self->add_trigger( check_skeleton_directory => \&check_skeleton_directory );
9             }
10              
11             sub check_skeleton_directory {
12 39     39 1 1219 my $self = shift;
13 39 100       226 return unless $self->dialog("Check Makefile.PL? [Yn] ", 'y') =~ /[Yy]/;
14              
15 5 100       79 !$self->system('perl', 'Makefile.PL') or die $?;
16 4 100       33 !$self->system('make', 'test') or die $?;
17 3 100       30 !$self->system('make', 'manifest') or die $?;
18 2 100       16 !$self->system('make', 'distclean') or die $?;
19             }
20              
21             1;