| 1 | package Module::Build::Platform::Unix; | ||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||
| 3 | 297 | ▶ | use strict; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 4 | 297 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 5 | 297 | our $VERSION = '0.4234'; | |||||||||||||||||||||||||||||||||
| 6 | 297 | $VERSION = eval $VERSION; | |||||||||||||||||||||||||||||||||
| 7 | 297 | ▶ | use Module::Build::Base; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||
| 9 | 297 | our @ISA = qw(Module::Build::Base); | |||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||
| 11 | 144 | ▶ | sub is_executable { | ||||||||||||||||||||||||||||||||
|
Subroutine
is_executable: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 12 | # We consider the owner bit to be authoritative on a file, because | ||||||||||||||||||||||||||||||||||
| 13 | # -x will always return true if the user is root and *any* | ||||||||||||||||||||||||||||||||||
| 14 | # executable bit is set. The -x test seems to try to answer the | ||||||||||||||||||||||||||||||||||
| 15 | # question "can I execute this file", but I think we want "is this | ||||||||||||||||||||||||||||||||||
| 16 | # file executable". | ||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||
| 18 | 144 | my ($self, $file) = @_; | |||||||||||||||||||||||||||||||||
| 19 | 144 | return +(stat $file)[2] & 0100; | |||||||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||
| 22 | 6 | ▶ | sub _startperl { "#! " . shift()->perl } | ||||||||||||||||||||||||||||||||
|
Subroutine
_startperl: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||
| 24 | 563 | ▶ | sub _construct { | ||||||||||||||||||||||||||||||||
|
Subroutine
_construct: called CC=3 SCAR=11.4
| |||||||||||||||||||||||||||||||||||
| 25 | 563 | my $self = shift()->SUPER::_construct(@_); | |||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||
| 27 | # perl 5.8.1-RC[1-3] had some broken %Config entries, and | ||||||||||||||||||||||||||||||||||
| 28 | # unfortunately Red Hat 9 shipped it like that. Fix 'em up here. | ||||||||||||||||||||||||||||||||||
| 29 | 549 | my $c = $self->{config}; | |||||||||||||||||||||||||||||||||
| 30 | 549 | for (qw(siteman1 siteman3 vendorman1 vendorman3)) { | |||||||||||||||||||||||||||||||||
| 31 | 2196 | ▶ | $c->{"install${_}dir"} ||= $c->{"install${_}"}; | ||||||||||||||||||||||||||||||||
|
Condition33%1/3
$$c{"install${_}dir"} ||= $$c{"install$_"}
MC/DC0%0/2
$$c{"install${_}dir"} ||= $$c{"install$_"}
$$c{"install${_}dir"}
$$c{"install$_"}
Truth table33%1/3
A ||= B
A= $$c{"install${_}dir"}B= $$c{"install$_"}
| |||||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||
| 34 | 549 | return $self; | |||||||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||
| 37 | # Open group says username should be portable filename characters, | ||||||||||||||||||||||||||||||||||
| 38 | # but some Unix OS working with ActiveDirectory wind up with user-names | ||||||||||||||||||||||||||||||||||
| 39 | # with back-slashes in the name. The new code below is very liberal | ||||||||||||||||||||||||||||||||||
| 40 | # in what it accepts. | ||||||||||||||||||||||||||||||||||
| 41 | 0 | ▶ | sub _detildefy { | ||||||||||||||||||||||||||||||||
|
Subroutine
_detildefy: not called CC=5 SCAR=34.0
| |||||||||||||||||||||||||||||||||||
| 42 | 0 | my ($self, $value) = @_; | |||||||||||||||||||||||||||||||||
| 43 | 0 | $value =~ s[^~([^/]+)?(?=/|$)] # tilde with optional username | |||||||||||||||||||||||||||||||||
| 44 | [$1 ? | ||||||||||||||||||||||||||||||||||
| 45 | 0 | ▶ | (eval{(getpwnam $1)[7]} || "~$1") : | ||||||||||||||||||||||||||||||||
|
Condition0%0/6
$ENV{"HOME"} or eval {
do {
(getpwuid $>)[7]
}
} or glob "~"
$ENV{"HOME"} or eval {
do {
(getpwuid $>)[7]
}
}
MC/DC0%0/3
$ENV{"HOME"} or eval {
do {
(getpwuid $>)[7]
}
} or glob "~"
$ENV{"HOME"}
eval {
do {
(getpwuid $>)[7]
}
}
glob "~"
Truth table0%0/4
A or B or C
A= $ENV{"HOME"}B= eval {
do {
(getpwuid $>)[7]
}
}C= glob "~"
| |||||||||||||||||||||||||||||||||||
| 46 | 0 | ▶ | ($ENV{HOME} || eval{(getpwuid $>)[7]} || glob("~")) | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/2
eval {
do {
(getpwnam $1)[7]
}
} or "~$1"
MC/DC0%0/1
eval {
do {
(getpwnam $1)[7]
}
} or "~$1"
eval {
do {
(getpwnam $1)[7]
}
}
Truth table0%0/2
A
A= eval {
do {
(getpwnam $1)[7]
}
}
| |||||||||||||||||||||||||||||||||||
| 47 | ]ex; | ||||||||||||||||||||||||||||||||||
| 48 | 0 | return $value; | |||||||||||||||||||||||||||||||||
| 49 | } | ||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||
| 51 | 297 | 1; | |||||||||||||||||||||||||||||||||
| 52 | __END__ | ||||||||||||||||||||||||||||||||||