line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Shipwright; |
2
|
|
|
|
|
|
|
|
3
|
15
|
|
|
15
|
|
277890
|
use warnings; |
|
15
|
|
|
|
|
88
|
|
|
15
|
|
|
|
|
454
|
|
4
|
15
|
|
|
15
|
|
71
|
use strict; |
|
15
|
|
|
|
|
24
|
|
|
15
|
|
|
|
|
300
|
|
5
|
15
|
|
|
15
|
|
2809
|
use version; our $VERSION = qv('2.4.42'); |
|
15
|
|
|
|
|
16831
|
|
|
15
|
|
|
|
|
81
|
|
6
|
|
|
|
|
|
|
|
7
|
15
|
|
|
15
|
|
1243
|
use base qw/Shipwright::Base/; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
4311
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw/backend source build log_level log_file/); |
10
|
|
|
|
|
|
|
|
11
|
15
|
|
|
15
|
|
3250
|
use Shipwright::Logger; |
|
15
|
|
|
|
|
46
|
|
|
15
|
|
|
|
|
448
|
|
12
|
15
|
|
|
15
|
|
85
|
use File::Spec::Functions qw/catfile tmpdir/; |
|
15
|
|
|
|
|
27
|
|
|
15
|
|
|
|
|
716
|
|
13
|
15
|
|
|
15
|
|
79
|
use Shipwright::Util; |
|
15
|
|
|
|
|
36
|
|
|
15
|
|
|
|
|
770
|
|
14
|
|
|
|
|
|
|
# strawberry perl's build make is 'dmake' |
15
|
15
|
|
|
15
|
|
4429
|
use File::Which 'which'; |
|
15
|
|
|
|
|
11455
|
|
|
15
|
|
|
|
|
3889
|
|
16
|
|
|
|
|
|
|
$ENV{SHIPWRIGHT_MAKE} ||= which('make') || which('dmake') || which( 'nmake' ) || 'make'; |
17
|
|
|
|
|
|
|
$ENV{SHIPWRIGHT_SVK} ||= which('svk') || 'svk'; |
18
|
|
|
|
|
|
|
$ENV{SHIPWRIGHT_SVN} ||= which('svn') || 'svn'; |
19
|
|
|
|
|
|
|
$ENV{SHIPWRIGHT_GIT} ||= which('git') || 'git'; |
20
|
|
|
|
|
|
|
$ENV{SHIPWRIGHT_DZIL} ||= which('dzil') || 'dzil'; |
21
|
|
|
|
|
|
|
$ENV{SHIPWRIGHT_LWP_TIMEOUT} ||= 1200; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
$ENV{PERL_MM_USE_DEFAULT} = 1; # always true |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# FTP_PASSIVE is true by default, |
26
|
|
|
|
|
|
|
# since many sites use this nowadays. |
27
|
|
|
|
|
|
|
unless ( defined $ENV{FTP_PASSIVE} ) { |
28
|
|
|
|
|
|
|
$ENV{FTP_PASSIVE} = 1; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 new |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub new { |
36
|
5
|
|
|
5
|
1
|
4384
|
my $class = shift; |
37
|
|
|
|
|
|
|
|
38
|
5
|
|
|
|
|
27
|
my %args = ( |
39
|
|
|
|
|
|
|
log_level => undef, |
40
|
|
|
|
|
|
|
log_file => undef, |
41
|
|
|
|
|
|
|
repository => undef, |
42
|
|
|
|
|
|
|
source => undef, |
43
|
|
|
|
|
|
|
@_ |
44
|
|
|
|
|
|
|
); |
45
|
5
|
100
|
|
|
|
22
|
$args{log_level} = $args{log_level} ? uc $args{log_level} : 'FATAL'; |
46
|
|
|
|
|
|
|
|
47
|
5
|
100
|
|
|
|
17
|
$args{log_file} = '-' unless $args{log_file}; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
my $self = { |
50
|
|
|
|
|
|
|
log_level => $args{log_level}, |
51
|
|
|
|
|
|
|
log_file => $args{log_file}, |
52
|
5
|
|
|
|
|
18
|
}; |
53
|
|
|
|
|
|
|
|
54
|
5
|
|
|
|
|
11
|
bless $self, $class; |
55
|
|
|
|
|
|
|
|
56
|
5
|
|
|
|
|
28
|
Shipwright::Logger->new($self); |
57
|
|
|
|
|
|
|
|
58
|
5
|
100
|
|
|
|
14
|
if ( $args{repository} ) { |
59
|
4
|
|
|
|
|
709
|
require Shipwright::Backend; |
60
|
4
|
|
|
|
|
29
|
$self->backend( Shipwright::Backend->new(%args) ); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
5
|
100
|
|
|
|
21
|
if ( $args{source} ) { |
64
|
1
|
|
|
|
|
249
|
require Shipwright::Source; |
65
|
1
|
|
|
|
|
8
|
$self->source( Shipwright::Source->new(%args) ); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
5
|
|
|
|
|
50
|
return $self; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
1; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
__END__ |