summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-01-26 16:11:25 +0000
committerfukachan <fukachan>2001-01-26 16:11:25 +0000
commitf8bccac483468fdb0c4c661b2a2ccfd73179c033 (patch)
tree5bb5ac38780e26cb8c72a3982891ad68d2511a2f /fml
parentcf1db9dc974e5966c69da0408fa5b8745fe13a83 (diff)
downloadfml8-f8bccac483468fdb0c4c661b2a2ccfd73179c033.tar.gz
fml8-f8bccac483468fdb0c4c661b2a2ccfd73179c033.tar.bz2
fml8-f8bccac483468fdb0c4c661b2a2ccfd73179c033.zip
check defined() before replacing
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/Config.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/fml/lib/FML/Config.pm b/fml/lib/FML/Config.pm
index f8ac3bdf..868bf53c 100644
--- a/fml/lib/FML/Config.pm
+++ b/fml/lib/FML/Config.pm
@@ -148,8 +148,9 @@ sub _expand_variables
EXPANSION_LOOP:
while ($max++ < 16) {
$org = $config->{ $x };
-
- $config->{ $x } =~ s/\$([a-z_]+)/$config->{$1}/g;
+
+ $config->{$x} =~
+ s/\$([a-z_]+)/(defined $config->{$1} ? $config->{$1} : '')/ge;
last EXPANSION_LOOP if $config->{ $x } !~ /\$/o;
last EXPANSION_LOOP if $org eq $config->{ $x };