| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Module::Build::Pluggable::DistTestLibCoreOnly; |
|
2
|
1
|
|
|
1
|
|
813
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
31
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
30
|
|
|
4
|
1
|
|
|
1
|
|
30
|
use 5.008005; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
50
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.0.6'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
786
|
use parent qw/Module::Build::Pluggable::Base/; |
|
|
1
|
|
|
|
|
290
|
|
|
|
1
|
|
|
|
|
5
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub HOOK_build { |
|
10
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
11
|
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
$self->add_around_action_modifier( |
|
13
|
|
|
|
|
|
|
"disttest", \&_disttest |
|
14
|
|
|
|
|
|
|
); |
|
15
|
|
|
|
|
|
|
} |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _disttest { |
|
18
|
0
|
|
|
0
|
|
|
my ($code, $self) = @_; |
|
19
|
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
$self->depends_on('distdir'); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
_do_in_dir( |
|
23
|
|
|
|
|
|
|
$self, |
|
24
|
|
|
|
|
|
|
$self->dist_dir, |
|
25
|
|
|
|
|
|
|
sub { |
|
26
|
|
|
|
|
|
|
# XXX could be different names for scripts |
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
|
|
0
|
|
|
system('cpanm', '-L', '_local_lib/', '--installdeps', '.'); |
|
29
|
0
|
|
|
|
|
|
$ENV{PERL5OPT} = sprintf('-Mlib::core::only -Mlib=%s -Mlib=%s', |
|
30
|
|
|
|
|
|
|
File::Spec->rel2abs('_local_lib/lib/perl5'), |
|
31
|
|
|
|
|
|
|
File::Spec->rel2abs('lib') |
|
32
|
|
|
|
|
|
|
); |
|
33
|
|
|
|
|
|
|
|
|
34
|
0
|
0
|
|
|
|
|
$self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile |
|
35
|
|
|
|
|
|
|
or die "Error executing 'Build.PL' in dist directory: $!"; |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
0
|
|
|
|
|
$self->run_perl_script('Build') |
|
38
|
|
|
|
|
|
|
or die "Error executing 'Build' in dist directory: $!"; |
|
39
|
0
|
0
|
|
|
|
|
$self->run_perl_script( 'Build', [], ['test'] ) |
|
40
|
|
|
|
|
|
|
or die "Error executing 'Build test' in dist directory"; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
0
|
|
|
|
|
|
); |
|
43
|
|
|
|
|
|
|
} |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
# taken from M::B::Base |
|
46
|
|
|
|
|
|
|
sub _do_in_dir { |
|
47
|
0
|
|
|
0
|
|
|
my ( $self, $dir, $do ) = @_; |
|
48
|
|
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
my $start_dir = File::Spec->rel2abs( $self->cwd ); |
|
50
|
0
|
0
|
|
|
|
|
chdir $dir or die "Can't chdir() to $dir: $!"; |
|
51
|
0
|
|
|
|
|
|
eval { $do->() }; |
|
|
0
|
|
|
|
|
|
|
|
52
|
0
|
0
|
|
|
|
|
my @err = $@ ? ($@) : (); |
|
53
|
0
|
0
|
|
|
|
|
chdir $start_dir or push @err, "Can't chdir() back to $start_dir: $!"; |
|
54
|
0
|
0
|
|
|
|
|
die join "\n", @err if @err; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
|
58
|
|
|
|
|
|
|
__END__ |