File Coverage

blib/lib/Module/Install/Admin/Makefile.pm
Criterion Covered Total %
statement 14 28 50.0
branch 0 4 0.0
condition 0 2 0.0
subroutine 5 7 71.4
pod 0 2 0.0
total 19 43 44.1


line stmt bran cond sub pod time code
1             package Module::Install::Admin::Makefile;
2              
3 1     1   859 use strict 'vars';
  1         2  
  1         31  
4 1     1   4 use Module::Install::Base;
  1         1  
  1         14  
5 1     1   3 use ExtUtils::MakeMaker ();
  1         69  
  1         17  
6              
7 1     1   4 use vars qw{$VERSION @ISA};
  1         1  
  1         47  
8             BEGIN {
9 1     1   2 $VERSION = '1.18';
10 1         198 @ISA = qw{Module::Install::Base};
11             }
12              
13             sub postamble {
14 0     0 0   my ($self, $text) = @_;
15 0           my $class = ref($self);
16 0           my $top_class = ref($self->_top);
17 0           my $admin_class = join('::', @{$self->_top}{qw(name dispatch)});
  0            
18              
19 0   0       $self->{postamble} ||= << "END_MAKEFILE";
20             # --- $class section:
21              
22             realclean purge ::
23             \t\$(RM_F) \$(DISTVNAME).tar\$(SUFFIX)
24             \t\$(RM_F) MANIFEST.bak _build
25             \t\$(PERL) "-Ilib" "-M$admin_class" -e "remove_meta()"
26             \t\$(RM_RF) inc
27              
28             reset :: purge
29              
30             upload :: test dist
31             \tcpan-upload -verbose \$(DISTVNAME).tar\$(SUFFIX)
32              
33             grok ::
34             \tperldoc $top_class
35              
36             distsign ::
37             \tcpansign -s
38              
39             END_MAKEFILE
40              
41 0 0         $self->{postamble} .= $text if defined $text;
42 0           return $self->{postamble};
43             }
44              
45             sub preop {
46 0     0 0   my $self = shift;
47 0           my ($user_preop) = @_;
48 0           my $admin_class = join('::', @{$self->_top}{qw(name dispatch)});
  0            
49 0 0         $user_preop = qq{\$(PERL) -I. "-M$admin_class" -e "dist_preop(q(\$(DISTVNAME)))"} unless $user_preop;
50 0           return { PREOP => $user_preop };
51             }
52              
53             1;