line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dist::Joseki::Base; |
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
4
|
|
|
|
|
|
|
our $VERSION = '0.20'; |
5
|
1
|
|
|
1
|
|
5
|
use base qw(Class::Accessor::Complex); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1443
|
|
6
|
|
|
|
|
|
|
__PACKAGE__->mk_new; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub read_from_cmd { |
9
|
0
|
|
|
0
|
0
|
|
my ($self, $cmd) = @_; |
10
|
0
|
0
|
|
|
|
|
open my $fh, '-|', $cmd or die "can't read from pipe $cmd: $!\n"; |
11
|
0
|
|
|
|
|
|
my @result = <$fh>; |
12
|
0
|
|
|
|
|
|
close $fh; |
13
|
0
|
0
|
|
|
|
|
wantarray ? @result : join '' => @result; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub safe_system { |
17
|
0
|
|
|
0
|
0
|
|
my ($self, @args) = @_; |
18
|
0
|
0
|
|
|
|
|
system(@args) == 0 or die "system @args failed: $?"; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub assert_is_dist_base_dir { |
22
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
23
|
0
|
0
|
0
|
|
|
|
die "Looks like this is not a distribution base directory\n" |
24
|
|
|
|
|
|
|
unless -e 'Makefile.PL' || -e 'Build.PL'; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub print_header { |
28
|
0
|
|
|
0
|
0
|
|
my ($self, $text) = @_; |
29
|
0
|
|
|
|
|
|
1 while chomp $text; |
30
|
0
|
|
|
|
|
|
print "\n", '-' x 75, "\n"; |
31
|
0
|
|
|
|
|
|
print "$text\n"; |
32
|
0
|
|
|
|
|
|
print '-' x 75, "\n\n"; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
__END__ |