line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Install::CheckLib; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
77291
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
5
|
1
|
|
|
1
|
|
6
|
use File::Spec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
6
|
1
|
|
|
1
|
|
6
|
use base qw(Module::Install::Base); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
514
|
|
7
|
1
|
|
|
1
|
|
6
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
466
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
$VERSION = '0.14'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub checklibs { |
12
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
13
|
0
|
0
|
|
|
|
|
return unless scalar @_; |
14
|
0
|
|
|
|
|
|
my %parms = @_; |
15
|
0
|
0
|
|
|
|
|
unless (_author_side(delete $parms{run_checks_as_author})) { |
16
|
0
|
|
|
|
|
|
require Devel::CheckLib; |
17
|
0
|
|
|
|
|
|
Devel::CheckLib::check_lib_or_exit( %parms ); |
18
|
0
|
|
|
|
|
|
return; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub assertlibs { |
23
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
24
|
0
|
0
|
|
|
|
|
return unless scalar @_; |
25
|
0
|
|
|
|
|
|
my %parms = @_; |
26
|
0
|
0
|
|
|
|
|
unless (_author_side(delete $parms{run_checks_as_author})) { |
27
|
0
|
|
|
|
|
|
require Devel::CheckLib; |
28
|
0
|
|
|
|
|
|
Devel::CheckLib::assert_lib( %parms ); |
29
|
0
|
|
|
|
|
|
return; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _author_side { |
34
|
0
|
|
|
0
|
|
|
my $run_checks_as_author = shift; |
35
|
0
|
0
|
|
|
|
|
if ($Module::Install::AUTHOR) { |
36
|
0
|
|
|
|
|
|
mkdir 'inc'; |
37
|
0
|
|
|
|
|
|
mkdir 'inc/Devel'; |
38
|
0
|
|
|
|
|
|
print "Extra directories created under inc/\n"; |
39
|
0
|
|
|
|
|
|
require Devel::CheckLib; |
40
|
0
|
|
|
|
|
|
local $/ = undef; |
41
|
0
|
0
|
|
|
|
|
open(CHECKLIBPM, $INC{'Devel/CheckLib.pm'}) || |
42
|
|
|
|
|
|
|
die("Can't read $INC{'Devel/CheckLib.pm'}: $!"); |
43
|
0
|
|
|
|
|
|
(my $checklibpm = ) =~ s/package Devel::CheckLib/package #\nDevel::CheckLib/; |
44
|
0
|
|
|
|
|
|
close(CHECKLIBPM); |
45
|
0
|
0
|
|
|
|
|
open(CHECKLIBPM, '>'.File::Spec->catfile(qw(inc Devel CheckLib.pm))) || |
46
|
|
|
|
|
|
|
die("Can't write inc/Devel/CheckLib.pm: $!"); |
47
|
0
|
|
|
|
|
|
print CHECKLIBPM $checklibpm; |
48
|
0
|
|
|
|
|
|
close(CHECKLIBPM); |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
print "Copied Devel::CheckLib to inc/ directory\n"; |
51
|
0
|
|
|
|
|
|
return !$run_checks_as_author; |
52
|
|
|
|
|
|
|
} |
53
|
0
|
|
|
|
|
|
return 0; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
'All your libs are belong'; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |