| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
## no critic |
|
2
|
|
|
|
|
|
|
package Module::Install::MasonXComponent; |
|
3
|
|
|
|
|
|
|
|
|
4
|
1
|
|
|
1
|
|
1877
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
46
|
|
|
5
|
1
|
|
|
1
|
|
680
|
use Module::Install::Base; |
|
|
1
|
|
|
|
|
4
|
|
|
|
1
|
|
|
|
|
37
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
8
|
use vars qw{$VERSION $ISCORE @ISA}; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
100
|
|
|
8
|
|
|
|
|
|
|
BEGIN { |
|
9
|
1
|
|
|
1
|
|
2
|
$VERSION = '0.01'; |
|
10
|
1
|
|
|
|
|
2
|
$ISCORE = 0; |
|
11
|
1
|
|
|
|
|
215
|
@ISA = qw{Module::Install::Base}; |
|
12
|
|
|
|
|
|
|
} |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 METHODS |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head2 mason_component |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=over 4 |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=item Arguments: $directory? |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=item Return Value: none |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=back |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub mason_component { |
|
29
|
0
|
|
|
0
|
1
|
|
my ($self, $dir) = @_; |
|
30
|
|
|
|
|
|
|
|
|
31
|
0
|
|
0
|
|
|
|
$dir ||= 'component'; |
|
32
|
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
my %dests = ( |
|
34
|
|
|
|
|
|
|
site => 'DESTINSTALLSITELIB', |
|
35
|
|
|
|
|
|
|
vendor => 'DESTINSTALLVENDORLIB', |
|
36
|
|
|
|
|
|
|
perl => 'DESTINSTALLPRIVLIB', |
|
37
|
|
|
|
|
|
|
); |
|
38
|
|
|
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my $register_proto = <<"EOR"; |
|
40
|
|
|
|
|
|
|
register_%s_component :: |
|
41
|
|
|
|
|
|
|
\t\$(FULLPERL) -MMasonX::Component::Registry \\ |
|
42
|
|
|
|
|
|
|
\t\t-e"MasonX::Component::Registry->install_component(q(\$(NAME)), {\\ |
|
43
|
|
|
|
|
|
|
\t\t%\{ MasonX::Component::Registry->reader->read_file(q(component.ini))->{\$(NAME)} }, \\ |
|
44
|
|
|
|
|
|
|
\t\tcomp_root => q(\$(%s)\$(DFSEP)auto\$(DFSEP)\$(FULLEXT))})" |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
EOR |
|
47
|
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
my $register = join ('', map { |
|
49
|
0
|
|
|
|
|
|
sprintf $register_proto, $_, $dests{$_} |
|
50
|
|
|
|
|
|
|
} keys %dests); |
|
51
|
|
|
|
|
|
|
|
|
52
|
0
|
|
|
|
|
|
$self->postamble(<<"END_MAKEFILE"); |
|
53
|
|
|
|
|
|
|
config :: |
|
54
|
|
|
|
|
|
|
\t\$(NOECHO) \$(MOD_INSTALL) \\ |
|
55
|
|
|
|
|
|
|
\t\t"$dir" \$(INST_AUTODIR)\$(DFSEP)_component |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
install :: register_component |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
register_component :: register_\$(INSTALLDIRS)_component |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
register__component :: register_site_component |
|
62
|
|
|
|
|
|
|
\t\$(NOECHO) \$(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
$register |
|
65
|
|
|
|
|
|
|
END_MAKEFILE |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
# The above appears to behave incorrectly when used with old versions |
|
68
|
|
|
|
|
|
|
# of ExtUtils::Install (known-bad on RHEL 3, with 5.8.0) |
|
69
|
|
|
|
|
|
|
# So when we need to install a share directory, make sure we add a |
|
70
|
|
|
|
|
|
|
# dependency on a moderately new version of ExtUtils::MakeMaker. |
|
71
|
0
|
|
|
|
|
|
$self->build_requires( 'ExtUtils::MakeMaker' => '6.11' ); |
|
72
|
|
|
|
|
|
|
|
|
73
|
0
|
|
|
|
|
|
return; |
|
74
|
|
|
|
|
|
|
} |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |