line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package ExtUtils::Helpers; |
2
|
|
|
|
|
|
|
$ExtUtils::Helpers::VERSION = '0.025'; |
3
|
4
|
|
|
4
|
|
81765
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
168
|
|
4
|
4
|
|
|
4
|
|
20
|
use warnings FATAL => 'all'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
204
|
|
5
|
4
|
|
|
4
|
|
17
|
use Exporter 5.57 'import'; |
|
4
|
|
|
|
|
119
|
|
|
4
|
|
|
|
|
156
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
17
|
use Config; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
178
|
|
8
|
4
|
|
|
4
|
|
18
|
use File::Basename qw/basename/; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
389
|
|
9
|
4
|
|
|
4
|
|
1845
|
use File::Spec::Functions qw/splitpath canonpath abs2rel splitdir/; |
|
4
|
|
|
|
|
2312
|
|
|
4
|
|
|
|
|
341
|
|
10
|
4
|
|
|
4
|
|
2269
|
use Text::ParseWords 3.24 (); |
|
4
|
|
|
|
|
5287
|
|
|
4
|
|
|
|
|
422
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @EXPORT_OK = qw/make_executable split_like_shell man1_pagename man3_pagename detildefy/; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
BEGIN { |
15
|
4
|
|
|
4
|
|
19
|
my %impl_for = ( MSWin32 => 'Windows', VMS => 'VMS'); |
16
|
4
|
|
50
|
|
|
45
|
my $package = 'ExtUtils::Helpers::' . ($impl_for{$^O} || 'Unix'); |
17
|
4
|
|
50
|
|
|
24
|
my $impl = $impl_for{$^O} || 'Unix'; |
18
|
4
|
|
|
|
|
1953
|
require "ExtUtils/Helpers/$impl.pm"; |
19
|
4
|
|
|
|
|
1372
|
"ExtUtils::Helpers::$impl"->import(); |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub split_like_shell { |
23
|
5
|
|
|
5
|
1
|
4015
|
my ($string) = @_; |
24
|
|
|
|
|
|
|
|
25
|
5
|
50
|
|
|
|
15
|
return if not defined $string; |
26
|
5
|
|
|
|
|
40
|
$string =~ s/^\s+|\s+$//g; |
27
|
5
|
50
|
|
|
|
12
|
return if not length $string; |
28
|
|
|
|
|
|
|
|
29
|
5
|
|
|
|
|
15
|
return Text::ParseWords::shellwords($string); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub man1_pagename { |
33
|
1
|
|
|
1
|
1
|
14
|
my $filename = shift; |
34
|
1
|
|
|
|
|
116
|
return basename($filename).".$Config{man1ext}"; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
my %separator = ( |
38
|
|
|
|
|
|
|
MSWin32 => '.', |
39
|
|
|
|
|
|
|
VMS => '__', |
40
|
|
|
|
|
|
|
os2 => '.', |
41
|
|
|
|
|
|
|
cygwin => '.', |
42
|
|
|
|
|
|
|
); |
43
|
|
|
|
|
|
|
my $separator = $separator{$^O} || '::'; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub man3_pagename { |
46
|
3
|
|
|
3
|
1
|
5
|
my ($filename, $base) = @_; |
47
|
3
|
|
50
|
|
|
13
|
$base ||= 'lib'; |
48
|
3
|
|
|
|
|
9
|
my ($vols, $dirs, $file) = splitpath(canonpath(abs2rel($filename, $base))); |
49
|
3
|
|
|
|
|
315
|
$file = basename($file, qw/.pm .pod/); |
50
|
3
|
|
|
|
|
9
|
my @dirs = grep { length } splitdir($dirs); |
|
5
|
|
|
|
|
11
|
|
51
|
3
|
|
|
|
|
90
|
return join $separator, @dirs, "$file.$Config{man3ext}"; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# ABSTRACT: Various portability utilities for module builders |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |