summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-10-09 12:39:50 +0000
committerfukachan <fukachan>2001-10-09 12:39:50 +0000
commitae4a7015e19854552e2e85fde88cc6de525eebbc (patch)
tree061811668c96e26748f399c70452c0e6a6920206 /fml
parent9503c18fcd246e3c0ffa4bea03b75f875914c71b (diff)
downloadfml8-ae4a7015e19854552e2e85fde88cc6de525eebbc.tar.gz
fml8-ae4a7015e19854552e2e85fde88cc6de525eebbc.tar.bz2
fml8-ae4a7015e19854552e2e85fde88cc6de525eebbc.zip
check $config->{ $x } is defined() or not
Diffstat (limited to 'fml')
-rw-r--r--fml/libexec/Standalone.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/fml/libexec/Standalone.pm b/fml/libexec/Standalone.pm
index 7f0de8ac..de714b0e 100644
--- a/fml/libexec/Standalone.pm
+++ b/fml/libexec/Standalone.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Standalone.pm,v 1.5 2001/04/24 03:50:25 fukachan Exp $
+# $FML: Standalone.pm,v 1.6 2001/05/29 16:21:17 fukachan Exp $
#
@@ -109,8 +109,10 @@ sub _expand_variables
# check whether the variable definition is recursive.
# For example, definition "var_a = $var_a/b/c" causes a loop.
for my $x ( @order ) {
- if ($config->{ $x } =~ /\$$x/) {
- croak("loop1: definition of $x is recursive\n");
+ if ((defined $x) && defined ($config->{ $x })) {
+ if ($config->{ $x } =~ /\$$x/) {
+ croak("loop1: definition of $x is recursive\n");
+ }
}
}
@@ -119,6 +121,7 @@ sub _expand_variables
my $max = 0;
KEY:
for my $x ( @order ) {
+ next KEY unless defined($config->{ $x });
next KEY if $config->{ $x } !~ /\$/o;
# we need a loop to expand nested variables, for example,