line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# $Id$ |
2
|
|
|
|
|
|
|
# $Source$ |
3
|
|
|
|
|
|
|
# $Author$ |
4
|
|
|
|
|
|
|
# $HeadURL$ |
5
|
|
|
|
|
|
|
# $Revision$ |
6
|
|
|
|
|
|
|
# $Date$ |
7
|
|
|
|
|
|
|
package Config::PlConfig::Host::Global; |
8
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
33
|
|
|
2
|
|
|
|
|
85
|
|
9
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
61
|
|
10
|
2
|
|
|
2
|
|
41
|
use 5.006001; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
69
|
|
11
|
2
|
|
|
2
|
|
10
|
use Carp; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
143
|
|
12
|
2
|
|
|
2
|
|
1769
|
use English qw( -no_match_vars ); |
|
2
|
|
|
|
|
12733
|
|
|
2
|
|
|
|
|
18
|
|
13
|
2
|
|
|
2
|
|
993
|
use version; our $VERSION = qv('0.1_02'); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
16
|
|
14
|
2
|
|
|
2
|
|
319
|
use base 'Config::PlConfig::Host::Base'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
380
|
|
15
|
|
|
|
|
|
|
{ |
16
|
|
|
|
|
|
|
my %GLOBAL_DATADIR_FOR_OS = ( |
17
|
|
|
|
|
|
|
FreeBSD => '/etc/', |
18
|
|
|
|
|
|
|
NetBSD => '/etc/', |
19
|
|
|
|
|
|
|
OpenBSD => '/etc', |
20
|
|
|
|
|
|
|
Linux => '/etc', |
21
|
|
|
|
|
|
|
darwin => '/Library/Application Support', |
22
|
|
|
|
|
|
|
Win32 => 'C:\Application Support', # XXX Use Win32.pm or something. |
23
|
|
|
|
|
|
|
unix => '/etc', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $DEFAULT_OS = 'unix'; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub locate_confdir_parent { |
29
|
2
|
|
|
2
|
0
|
9
|
my $OS = $OSNAME; |
30
|
|
|
|
|
|
|
|
31
|
2
|
50
|
|
|
|
11
|
if ($GLOBAL_DATADIR_FOR_OS{$OS}) { |
32
|
0
|
|
|
|
|
0
|
return $GLOBAL_DATADIR_FOR_OS{$OS}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
2
|
|
|
|
|
9
|
return $GLOBAL_DATADIR_FOR_OS{$DEFAULT_OS}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# Module implementation here |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
44
|
|
|
|
|
|
|
__END__ |