line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
############################################################################### |
3
|
|
|
|
|
|
|
## ## |
4
|
|
|
|
|
|
|
## Copyright (c) 2003 by Steffen Beyer & Gerhard Albers. ## |
5
|
|
|
|
|
|
|
## All rights reserved. ## |
6
|
|
|
|
|
|
|
## ## |
7
|
|
|
|
|
|
|
## This package is free software; you can redistribute it ## |
8
|
|
|
|
|
|
|
## and/or modify it under the same terms as Perl itself. ## |
9
|
|
|
|
|
|
|
## ## |
10
|
|
|
|
|
|
|
############################################################################### |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Config::Manager::Base; |
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
853
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
15
|
1
|
|
|
1
|
|
5
|
use vars qw( @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION $SCOPE $NONE %SIG @ARGV ); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
171
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
require Exporter; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
@EXPORT = qw(); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
@EXPORT_OK = qw( |
24
|
|
|
|
|
|
|
$SCOPE |
25
|
|
|
|
|
|
|
GetList |
26
|
|
|
|
|
|
|
GetOrDie |
27
|
|
|
|
|
|
|
ReportErrorAndExit |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
%EXPORT_TAGS = (all => [@EXPORT_OK]); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$VERSION = '1.7'; |
33
|
|
|
|
|
|
|
|
34
|
1
|
|
|
1
|
|
953
|
use Config::Manager::Conf; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
55
|
|
35
|
1
|
|
|
1
|
|
824
|
use Config::Manager::Report qw(:all); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1576
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
################################################ |
38
|
|
|
|
|
|
|
## Private function, name prescribed by Perl! ## |
39
|
|
|
|
|
|
|
################################################ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
BEGIN # Global initialization |
42
|
|
|
|
|
|
|
{ |
43
|
1
|
|
|
1
|
|
3
|
my($self) = __PACKAGE__; |
44
|
1
|
|
|
|
|
1
|
my($depth,$caller,$index,$param,$match,$sec,$var,$val,$err); |
45
|
0
|
|
|
|
|
0
|
my ( $HOST_LIST, $LANG_LIST, $SRC_LIST, $OBJ_LIST, $EXE_LIST ); |
46
|
1
|
|
|
|
|
3
|
my(@Refs) = ( \$HOST_LIST,\$LANG_LIST,\$SRC_LIST,\$OBJ_LIST,\$EXE_LIST ); |
47
|
1
|
|
|
|
|
2
|
my(@Names) = qw( HOST_LIST LANG_LIST SRC_LIST OBJ_LIST EXE_LIST ); |
48
|
1
|
|
|
|
|
2
|
my($Section) = "Commandline"; |
49
|
1
|
|
|
|
|
1
|
my($EnvHost) = 1; |
50
|
1
|
|
|
|
|
1
|
my($EnvLang) = 1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
########################################################################### |
53
|
|
|
|
|
|
|
# Ensure writability of log dirs etc. for all users: |
54
|
1
|
|
|
|
|
10
|
umask(002); |
55
|
|
|
|
|
|
|
########################################################################### |
56
|
|
|
|
|
|
|
# Determine current "scope": |
57
|
1
|
|
|
|
|
2
|
$SCOPE = $NONE = 'NONE'; |
58
|
1
|
|
|
|
|
5
|
$self =~ s!::.*$!!; |
59
|
1
|
|
|
|
|
2
|
$depth = 0; |
60
|
1
|
|
|
|
|
8
|
while (defined ($caller = (caller($depth++))[0])) |
61
|
|
|
|
|
|
|
{ |
62
|
4
|
100
|
|
|
|
42
|
if ($caller =~ /^ ${self} |
63
|
|
|
|
|
|
|
:: ([a-zA-Z0-9_]+) |
64
|
|
|
|
|
|
|
(?: :: [a-zA-Z0-9_]+ )* $/ox) |
65
|
|
|
|
|
|
|
{ |
66
|
2
|
|
|
|
|
8
|
$SCOPE = $1; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
} |
69
|
1
|
50
|
|
|
|
3
|
if ($SCOPE eq $NONE) |
70
|
|
|
|
|
|
|
{ |
71
|
0
|
|
|
|
|
0
|
warn "WARNING: Couldn't determine the caller's \"scope\" (assuming '$NONE')!\n"; |
72
|
|
|
|
|
|
|
} |
73
|
1
|
50
|
|
|
|
40
|
unless (defined (Config::Manager::Conf->init( $SCOPE ))) |
74
|
|
|
|
|
|
|
{ |
75
|
0
|
|
|
|
|
0
|
$err = Config::Manager::Conf->error(); |
76
|
0
|
|
|
|
|
0
|
$err =~ s!\s+$!!; |
77
|
0
|
|
|
|
|
0
|
&abort( __PACKAGE__ . |
78
|
|
|
|
|
|
|
"::BEGIN(): Global initialization failed:\n$err\n" ); |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
########################################################################### |
81
|
|
|
|
|
|
|
# Install signal handlers for common signals: |
82
|
1
|
|
|
|
|
23
|
$SIG{'INT'} = 'IGNORE'; # Ignore Ctrl-C (important for closing log file!) |
83
|
|
|
|
|
|
|
########################################################################### |
84
|
|
|
|
|
|
|
# Initialize logging module and log file (trigger creation of singleton object): |
85
|
1
|
50
|
|
|
|
5
|
unless (ref ($err = Config::Manager::Report->singleton())) |
86
|
|
|
|
|
|
|
{ |
87
|
0
|
|
|
|
|
0
|
$err =~ s!\s+$!!; |
88
|
0
|
|
|
|
|
0
|
&abort( __PACKAGE__ . |
89
|
|
|
|
|
|
|
"::BEGIN(): Global initialization failed:\n$err\n" ); |
90
|
|
|
|
|
|
|
} |
91
|
1
|
|
|
|
|
2
|
$err = ''; |
92
|
1
|
|
|
|
|
21
|
Config::Manager::Report->notify(1); # in case this should be the default |
93
|
|
|
|
|
|
|
########################################################################### |
94
|
|
|
|
|
|
|
# # Read configuration constants for command line option processing: |
95
|
|
|
|
|
|
|
# for ( $index = 0; $index < @Refs; $index++ ) |
96
|
|
|
|
|
|
|
# { |
97
|
|
|
|
|
|
|
# $var = $Refs[$index]; |
98
|
|
|
|
|
|
|
# $val = $Names[$index]; |
99
|
|
|
|
|
|
|
# unless (defined (${$var} = Config::Manager::Conf->get( $Section, $val ))) |
100
|
|
|
|
|
|
|
# { |
101
|
|
|
|
|
|
|
# $err = Config::Manager::Conf->error(); |
102
|
|
|
|
|
|
|
# $err =~ s!\s+$!!; |
103
|
|
|
|
|
|
|
# Config::Manager::Report->report |
104
|
|
|
|
|
|
|
# ( |
105
|
|
|
|
|
|
|
# $TO_LOG+$TO_ERR,$LEVEL_FATAL+$USE_LEADIN, |
106
|
|
|
|
|
|
|
# __PACKAGE__ . "::BEGIN():", |
107
|
|
|
|
|
|
|
# "Couldn't get the value of configuration constant " . |
108
|
|
|
|
|
|
|
# Config::Manager::Conf::_name_($Section,$val) . ":", |
109
|
|
|
|
|
|
|
# $err |
110
|
|
|
|
|
|
|
# ); |
111
|
|
|
|
|
|
|
# &abort(); |
112
|
|
|
|
|
|
|
# } |
113
|
|
|
|
|
|
|
# # Sanity check (*MUST* be uppercase in order to avoid |
114
|
|
|
|
|
|
|
# # clashes with lowercase tool-specific parameters!): |
115
|
|
|
|
|
|
|
# unless (${$var} =~ m!^[A-Z][A-Z0-9]*(?:\|[A-Z][A-Z0-9]*)*$!) |
116
|
|
|
|
|
|
|
# { |
117
|
|
|
|
|
|
|
# Config::Manager::Report->report |
118
|
|
|
|
|
|
|
# ( |
119
|
|
|
|
|
|
|
# $TO_LOG+$TO_ERR,$LEVEL_FATAL+$USE_LEADIN, |
120
|
|
|
|
|
|
|
# __PACKAGE__ . "::BEGIN():", |
121
|
|
|
|
|
|
|
# "Syntax error in configuration constant " . |
122
|
|
|
|
|
|
|
# Config::Manager::Conf::_name_($Section,$val) . |
123
|
|
|
|
|
|
|
# " (must be UPPERCASE and '|'-separated)!" |
124
|
|
|
|
|
|
|
# ); |
125
|
|
|
|
|
|
|
# &abort(); |
126
|
|
|
|
|
|
|
# } |
127
|
|
|
|
|
|
|
# } |
128
|
|
|
|
|
|
|
# $match = "HOST=(?:$HOST_LIST)|LANG=(?:$LANG_LIST)|SRC=(?:$SRC_LIST)|OBJ=(?:$OBJ_LIST)|EXE=(?:$EXE_LIST)"; |
129
|
|
|
|
|
|
|
# ########################################################################### |
130
|
|
|
|
|
|
|
# # The shortcuts below implement the following precedence rules: # |
131
|
|
|
|
|
|
|
# # (low) Config File << Environment Variable << Command Line Option (high) # |
132
|
|
|
|
|
|
|
# ########################################################################### |
133
|
|
|
|
|
|
|
# # Configuration Shortcuts Part 1: |
134
|
|
|
|
|
|
|
# $index = 0; |
135
|
|
|
|
|
|
|
# LOOP1: |
136
|
|
|
|
|
|
|
# while ($index < @ARGV) |
137
|
|
|
|
|
|
|
# { |
138
|
|
|
|
|
|
|
# $param = \$ARGV[$index]; |
139
|
|
|
|
|
|
|
# if ($$param =~ m!^-(?:$match)(?:,(?:$match))*$!o) |
140
|
|
|
|
|
|
|
# { |
141
|
|
|
|
|
|
|
# splice(@ARGV,$index,1); |
142
|
|
|
|
|
|
|
# while ($$param =~ m!($match)!go) |
143
|
|
|
|
|
|
|
# { |
144
|
|
|
|
|
|
|
# $sec = $1; |
145
|
|
|
|
|
|
|
# ($var,$val) = split(/=/, $sec); |
146
|
|
|
|
|
|
|
# $EnvHost = 0 if ($var eq 'HOST'); |
147
|
|
|
|
|
|
|
# $EnvLang = 0 if ($var eq 'LANG'); |
148
|
|
|
|
|
|
|
# splice(@ARGV,$index,0,"-D${Section}::$var=$val"); |
149
|
|
|
|
|
|
|
# $index++; |
150
|
|
|
|
|
|
|
# } |
151
|
|
|
|
|
|
|
# next LOOP1; |
152
|
|
|
|
|
|
|
# } |
153
|
|
|
|
|
|
|
# elsif ($$param =~ m!^-($HOST_LIST),($LANG_LIST),($SRC_LIST),($OBJ_LIST),($EXE_LIST)$!o) |
154
|
|
|
|
|
|
|
# { |
155
|
|
|
|
|
|
|
# $EnvHost = 0; |
156
|
|
|
|
|
|
|
# $EnvLang = 0; |
157
|
|
|
|
|
|
|
# splice(@ARGV,$index,1, |
158
|
|
|
|
|
|
|
# "-D${Section}::HOST=$1", |
159
|
|
|
|
|
|
|
# "-D${Section}::LANG=$2", |
160
|
|
|
|
|
|
|
# "-D${Section}::SRC=$3", |
161
|
|
|
|
|
|
|
# "-D${Section}::OBJ=$4", |
162
|
|
|
|
|
|
|
# "-D${Section}::EXE=$5" ); |
163
|
|
|
|
|
|
|
# $index += 5; |
164
|
|
|
|
|
|
|
# next LOOP1; |
165
|
|
|
|
|
|
|
# } |
166
|
|
|
|
|
|
|
# elsif ($$param =~ m!^-($LANG_LIST),($SRC_LIST),($OBJ_LIST),($EXE_LIST)$!o) |
167
|
|
|
|
|
|
|
# { |
168
|
|
|
|
|
|
|
# $EnvLang = 0; |
169
|
|
|
|
|
|
|
# splice(@ARGV,$index,1, |
170
|
|
|
|
|
|
|
# "-D${Section}::LANG=$1", |
171
|
|
|
|
|
|
|
# "-D${Section}::SRC=$2", |
172
|
|
|
|
|
|
|
# "-D${Section}::OBJ=$3", |
173
|
|
|
|
|
|
|
# "-D${Section}::EXE=$4" ); |
174
|
|
|
|
|
|
|
# $index += 4; |
175
|
|
|
|
|
|
|
# next LOOP1; |
176
|
|
|
|
|
|
|
# } |
177
|
|
|
|
|
|
|
# elsif ($$param =~ m!^-($SRC_LIST),($OBJ_LIST),($EXE_LIST)$!o) |
178
|
|
|
|
|
|
|
# { |
179
|
|
|
|
|
|
|
# splice(@ARGV,$index,1, |
180
|
|
|
|
|
|
|
# "-D${Section}::SRC=$1", |
181
|
|
|
|
|
|
|
# "-D${Section}::OBJ=$2", |
182
|
|
|
|
|
|
|
# "-D${Section}::EXE=$3" ); |
183
|
|
|
|
|
|
|
# $index += 3; |
184
|
|
|
|
|
|
|
# next LOOP1; |
185
|
|
|
|
|
|
|
# } |
186
|
|
|
|
|
|
|
# elsif ($$param =~ m!^-($HOST_LIST),($LANG_LIST)$!o) |
187
|
|
|
|
|
|
|
# { |
188
|
|
|
|
|
|
|
# $EnvHost = 0; |
189
|
|
|
|
|
|
|
# $EnvLang = 0; |
190
|
|
|
|
|
|
|
# splice(@ARGV,$index,1, |
191
|
|
|
|
|
|
|
# "-D${Section}::HOST=$1", |
192
|
|
|
|
|
|
|
# "-D${Section}::LANG=$2" ); |
193
|
|
|
|
|
|
|
# $index += 2; |
194
|
|
|
|
|
|
|
# next LOOP1; |
195
|
|
|
|
|
|
|
# } |
196
|
|
|
|
|
|
|
# elsif ($$param =~ s!^-($LANG_LIST)$!-D${Section}::LANG=$1!o) { $EnvLang = 0; } |
197
|
|
|
|
|
|
|
# elsif ($$param =~ m!^-D${Section}::LANG=(?:$LANG_LIST)$!o) { $EnvLang = 0; } |
198
|
|
|
|
|
|
|
# elsif ($$param =~ s!^-($HOST_LIST)$!-D${Section}::HOST=$1!o) { $EnvHost = 0; } |
199
|
|
|
|
|
|
|
# elsif ($$param =~ m!^-D${Section}::HOST=(?:$HOST_LIST)$!o) { $EnvHost = 0; } |
200
|
|
|
|
|
|
|
# $index++; |
201
|
|
|
|
|
|
|
# } |
202
|
|
|
|
|
|
|
# ########################################################################### |
203
|
|
|
|
|
|
|
# # Configuration Shortcuts Part 2: |
204
|
|
|
|
|
|
|
# unshift( @ARGV, "-D${Section}::LANG=$1" ) |
205
|
|
|
|
|
|
|
# if ($EnvLang and |
206
|
|
|
|
|
|
|
# (exists $ENV{'COMPLANG'}) and |
207
|
|
|
|
|
|
|
# (defined $ENV{'COMPLANG'}) and |
208
|
|
|
|
|
|
|
# ( $ENV{'COMPLANG'} =~ m!^($LANG_LIST)$!o)); |
209
|
|
|
|
|
|
|
# ########################################################################### |
210
|
|
|
|
|
|
|
# # Configuration Shortcuts Part 3: |
211
|
|
|
|
|
|
|
# unshift( @ARGV, "-D${Section}::HOST=$1" ) |
212
|
|
|
|
|
|
|
# if ($EnvHost and |
213
|
|
|
|
|
|
|
# (exists $ENV{'PLATFORM'}) and |
214
|
|
|
|
|
|
|
# (defined $ENV{'PLATFORM'}) and |
215
|
|
|
|
|
|
|
# ( $ENV{'PLATFORM'} =~ m!^($HOST_LIST)$!o)); |
216
|
|
|
|
|
|
|
########################################################################### |
217
|
|
|
|
|
|
|
# Process "Define"s for configuration constants: |
218
|
1
|
|
|
|
|
1
|
$index = 0; |
219
|
|
|
|
|
|
|
LOOP2: |
220
|
1
|
|
|
|
|
596
|
while ($index < @ARGV) |
221
|
|
|
|
|
|
|
{ |
222
|
0
|
|
|
|
|
|
$param = $ARGV[$index]; |
223
|
0
|
0
|
|
|
|
|
if ($param =~ /^-D ( [a-zA-Z][a-zA-Z0-9_-]* ) |
224
|
|
|
|
|
|
|
( (?: :: [a-zA-Z][a-zA-Z0-9_-]* )? ) |
225
|
|
|
|
|
|
|
= ( .* ) $/x) |
226
|
|
|
|
|
|
|
{ |
227
|
0
|
|
|
|
|
|
$sec = $1; |
228
|
0
|
|
|
|
|
|
$var = $2; |
229
|
0
|
|
|
|
|
|
$val = $3; |
230
|
0
|
0
|
|
|
|
|
if ($var eq '') |
231
|
|
|
|
|
|
|
{ |
232
|
0
|
|
|
|
|
|
$var = $sec; |
233
|
0
|
|
|
|
|
|
$sec = 'DEFAULT'; |
234
|
|
|
|
|
|
|
} |
235
|
0
|
|
|
|
|
|
else { $var = substr($var,2); } |
236
|
0
|
0
|
0
|
|
|
|
if ((substr($sec,-1) ne '-') && (substr($var,-1) ne '-')) |
237
|
|
|
|
|
|
|
{ |
238
|
0
|
0
|
|
|
|
|
unless (defined (Config::Manager::Conf->set( $sec,$var,$val ))) |
239
|
|
|
|
|
|
|
{ |
240
|
0
|
|
|
|
|
|
$err = Config::Manager::Conf->error(); |
241
|
0
|
|
|
|
|
|
$err =~ s!\s+$!!; |
242
|
0
|
|
|
|
|
|
Config::Manager::Report->report |
243
|
|
|
|
|
|
|
( |
244
|
|
|
|
|
|
|
$TO_LOG+$TO_ERR,$LEVEL_FATAL+$USE_LEADIN, |
245
|
|
|
|
|
|
|
__PACKAGE__ . "::BEGIN():", |
246
|
|
|
|
|
|
|
"Couldn't set the value of configuration constant " . |
247
|
|
|
|
|
|
|
Config::Manager::Conf::_name_($sec,$var) . ":", |
248
|
|
|
|
|
|
|
$err |
249
|
|
|
|
|
|
|
); |
250
|
0
|
|
|
|
|
|
&abort(); |
251
|
|
|
|
|
|
|
} |
252
|
|
|
|
|
|
|
Config::Manager::Report->report |
253
|
|
|
|
|
|
|
( |
254
|
0
|
|
|
|
|
|
$TO_LOG,$LEVEL_INFO, |
255
|
|
|
|
|
|
|
"OVERRIDE: " . Config::Manager::Conf::_name_($sec,$var) . " = \"${val}\"" |
256
|
|
|
|
|
|
|
); |
257
|
0
|
|
|
|
|
|
splice(@ARGV,$index,1); # remove option from command line |
258
|
0
|
|
|
|
|
|
next LOOP2; |
259
|
|
|
|
|
|
|
} |
260
|
|
|
|
|
|
|
} |
261
|
0
|
|
|
|
|
|
$index++; |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
} |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
####################### |
266
|
|
|
|
|
|
|
## Public functions: ## |
267
|
|
|
|
|
|
|
####################### |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
sub ReportErrorAndExit |
270
|
|
|
|
|
|
|
{ |
271
|
0
|
|
|
0
|
0
|
|
my($fishy) = 1; |
272
|
|
|
|
|
|
|
|
273
|
0
|
0
|
|
|
|
|
if (Config::Manager::Report->ret_hold() > 0) |
274
|
|
|
|
|
|
|
{ |
275
|
0
|
|
|
|
|
|
Config::Manager::Report->report($FROM_HOLD+$TO_ERR); |
276
|
0
|
|
|
|
|
|
$fishy = 0; |
277
|
|
|
|
|
|
|
} |
278
|
0
|
0
|
|
|
|
|
if (@_ > 0) |
279
|
|
|
|
|
|
|
{ |
280
|
0
|
|
|
|
|
|
Config::Manager::Report->report($TO_LOG+$TO_ERR,$LEVEL_ERROR+$USE_LEADIN,@_); |
281
|
0
|
|
|
|
|
|
$fishy = 0; |
282
|
|
|
|
|
|
|
} |
283
|
0
|
0
|
|
|
|
|
if ($fishy) |
284
|
|
|
|
|
|
|
{ |
285
|
0
|
|
|
|
|
|
Config::Manager::Report->report( |
286
|
|
|
|
|
|
|
$TO_LOG+$TO_ERR,$LEVEL_ERROR+$USE_LEADIN, |
287
|
|
|
|
|
|
|
"Program abortion without error message -", |
288
|
|
|
|
|
|
|
"see log file for possible causes!" ); |
289
|
0
|
|
|
|
|
|
Config::Manager::Report->notify(1); # print location of log file if possible |
290
|
|
|
|
|
|
|
} |
291
|
0
|
|
|
|
|
|
&abort(); |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
sub GetList |
295
|
|
|
|
|
|
|
{ |
296
|
0
|
|
|
0
|
0
|
|
my($conf,$item,$value,$error); |
297
|
0
|
|
|
|
|
|
my(@list); |
298
|
|
|
|
|
|
|
|
299
|
0
|
0
|
0
|
|
|
|
if ((@_ > 0) && (ref($_[0]) eq 'Config::Manager::Conf')) |
300
|
0
|
|
|
|
|
|
{ $conf = shift; } |
301
|
|
|
|
|
|
|
else |
302
|
0
|
|
|
|
|
|
{ $conf = Config::Manager::Conf->default(); } |
303
|
0
|
|
|
|
|
|
@list = (); |
304
|
0
|
|
|
|
|
|
foreach $item (@_) |
305
|
|
|
|
|
|
|
{ |
306
|
0
|
0
|
0
|
|
|
|
if (ref($item) && (ref($item) eq 'ARRAY') && (@{$item} > 0)) |
|
0
|
|
0
|
|
|
|
|
307
|
|
|
|
|
|
|
{ |
308
|
0
|
0
|
|
|
|
|
if (defined ($value = $conf->get( @{$item} ))) |
|
0
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
{ |
310
|
0
|
|
|
|
|
|
push(@list, $value); |
311
|
|
|
|
|
|
|
} |
312
|
|
|
|
|
|
|
else |
313
|
|
|
|
|
|
|
{ |
314
|
0
|
|
|
|
|
|
$error = $conf->error(); |
315
|
0
|
|
|
|
|
|
$error =~ s!\s+$!!; |
316
|
0
|
|
|
|
|
|
Config::Manager::Report->report |
317
|
|
|
|
|
|
|
( |
318
|
|
|
|
|
|
|
@ERROR, |
319
|
|
|
|
|
|
|
"Couldn't get the value of configuration constant " . |
320
|
0
|
|
|
|
|
|
Config::Manager::Conf::_name_(@{$item}) . ":", |
321
|
|
|
|
|
|
|
$error |
322
|
|
|
|
|
|
|
); |
323
|
0
|
|
|
|
|
|
return (); |
324
|
|
|
|
|
|
|
} |
325
|
|
|
|
|
|
|
} |
326
|
|
|
|
|
|
|
else |
327
|
|
|
|
|
|
|
{ |
328
|
0
|
|
|
|
|
|
Config::Manager::Report->report |
329
|
|
|
|
|
|
|
( |
330
|
|
|
|
|
|
|
@FATAL, |
331
|
|
|
|
|
|
|
"Parameter '$item' is not a valid ARRAY reference (internal program error)" |
332
|
|
|
|
|
|
|
); |
333
|
0
|
|
|
|
|
|
return (); |
334
|
|
|
|
|
|
|
} |
335
|
|
|
|
|
|
|
} |
336
|
0
|
|
|
|
|
|
return (@list); |
337
|
|
|
|
|
|
|
} |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
sub GetOrDie |
340
|
|
|
|
|
|
|
{ |
341
|
0
|
|
|
0
|
0
|
|
my(@list); |
342
|
|
|
|
|
|
|
|
343
|
0
|
0
|
|
|
|
|
if (@list = &GetList(@_)) { return (@list); } |
|
0
|
|
|
|
|
|
|
344
|
0
|
|
|
|
|
|
&ReportErrorAndExit(); |
345
|
|
|
|
|
|
|
} |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
1; |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
__END__ |