line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ShipIt::ProjectType::Perl::ModuleBuild; |
2
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
85
|
|
3
|
2
|
|
|
2
|
|
10
|
use base 'ShipIt::ProjectType::Perl::MakeMaker'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
734
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub new { |
6
|
0
|
|
|
0
|
0
|
|
my ($class) = @_; |
7
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new; |
8
|
0
|
|
|
|
|
|
return $self; |
9
|
|
|
|
|
|
|
} |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub prepare_build { |
12
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
13
|
0
|
0
|
|
|
|
|
system("perl", "Build.PL") and die "Build.PL failed"; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub run_build { |
17
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
18
|
0
|
|
|
|
|
|
my($cmd) = @_; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
!system("perl", "Build", $cmd); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub makedist { |
24
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
25
|
0
|
|
|
|
|
|
$self->prepare_build; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
require Module::Build; |
28
|
0
|
|
|
|
|
|
my $build = Module::Build->current; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
my $file = $build->dist_dir; |
31
|
0
|
|
|
|
|
|
$file .= ".tar.gz"; |
32
|
0
|
0
|
|
|
|
|
die "Distfile $file already exists.\n" if -e $file; |
33
|
|
|
|
|
|
|
|
34
|
0
|
0
|
|
|
|
|
$self->run_build("dist") or die "make dist failed"; |
35
|
0
|
0
|
|
|
|
|
die "Distfile $file doesn't exists, but should.\n" unless -e $file; |
36
|
0
|
|
|
|
|
|
return $file; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|