This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Emergency fix for /tmp dir cleanup's for smokers.
[perl5.git] / lib / Module / Build / Platform / Unix.pm
CommitLineData
bb4e9162
YST
1package Module::Build::Platform::Unix;
2
3use strict;
4use Module::Build::Base;
5
6use vars qw(@ISA);
7@ISA = qw(Module::Build::Base);
8
9sub make_tarball {
10 my $self = shift;
11 $self->{args}{tar} ||= ['tar'];
12 $self->{args}{gzip} ||= ['gzip'];
13 $self->SUPER::make_tarball(@_);
14}
15
f943a5bf
SP
16sub is_executable {
17 # We consider the owner bit to be authoritative on a file, because
18 # -x will always return true if the user is root and *any*
19 # executable bit is set. The -x test seems to try to answer the
20 # question "can I execute this file", but I think we want "is this
21 # file executable".
22
23 my ($self, $file) = @_;
24 return +(stat $file)[2] & 0100;
25}
26
bb4e9162
YST
27sub _startperl { "#! " . shift()->perl }
28
29sub _construct {
30 my $self = shift()->SUPER::_construct(@_);
31
32 # perl 5.8.1-RC[1-3] had some broken %Config entries, and
33 # unfortunately Red Hat 9 shipped it like that. Fix 'em up here.
34 my $c = $self->{config};
35 for (qw(siteman1 siteman3 vendorman1 vendorman3)) {
36 $c->{"install${_}dir"} ||= $c->{"install${_}"};
37 }
38
39 return $self;
40}
41
421;
43__END__
44
45
46=head1 NAME
47
48Module::Build::Platform::Unix - Builder class for Unix platforms
49
50=head1 DESCRIPTION
51
52The sole purpose of this module is to inherit from
53C<Module::Build::Base>. Please see the L<Module::Build> for the docs.
54
55=head1 AUTHOR
56
77e96e88 57Ken Williams <kwilliams@cpan.org>
bb4e9162
YST
58
59=head1 SEE ALSO
60
61perl(1), Module::Build(3), ExtUtils::MakeMaker(3)
62
63=cut