1 package Module::Build::Platform::Unix;
6 $VERSION = eval $VERSION;
7 use Module::Build::Base;
10 @ISA = qw(Module::Build::Base);
13 # We consider the owner bit to be authoritative on a file, because
14 # -x will always return true if the user is root and *any*
15 # executable bit is set. The -x test seems to try to answer the
16 # question "can I execute this file", but I think we want "is this
19 my ($self, $file) = @_;
20 return +(stat $file)[2] & 0100;
23 sub _startperl { "#! " . shift()->perl }
26 my $self = shift()->SUPER::_construct(@_);
28 # perl 5.8.1-RC[1-3] had some broken %Config entries, and
29 # unfortunately Red Hat 9 shipped it like that. Fix 'em up here.
30 my $c = $self->{config};
31 for (qw(siteman1 siteman3 vendorman1 vendorman3)) {
32 $c->{"install${_}dir"} ||= $c->{"install${_}"};
38 # Open group says username should be portable filename characters,
39 # but some Unix OS working with ActiveDirectory wind up with user-names
40 # with back-slashes in the name. The new code below is very liberal
43 my ($self, $value) = @_;
44 $value =~ s[^~([^/]+)?(?=/|$)] # tilde with optional username
46 ((getpwnam $1)[7] || "~$1") :
47 ($ENV{HOME} || (getpwuid $>)[7])
58 Module::Build::Platform::Unix - Builder class for Unix platforms
62 The sole purpose of this module is to inherit from
63 C<Module::Build::Base>. Please see the L<Module::Build> for the docs.
67 Ken Williams <kwilliams@cpan.org>
71 perl(1), Module::Build(3), ExtUtils::MakeMaker(3)