From 0def0a63955d3e41dc0090d762661cfcb31b091b Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sat, 12 Jan 2008 16:36:39 +0000 Subject: * avoid possible warnings about undefined values in regex-substitution (fixed the second incarnation of this bug, too) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1471 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/slxconfig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'config-db') diff --git a/config-db/slxconfig b/config-db/slxconfig index f63224a9..3a293e09 100755 --- a/config-db/slxconfig +++ b/config-db/slxconfig @@ -225,14 +225,16 @@ sub parseKeyValueArgsWithAttrs } my $key = lc($1); my $value = $2; - if ($value eq '-') { - $value = undef; - } # replace escaped newlines and tab chars by the respective real thing $value =~ s{\\n}{\n}gms; $value =~ s{\\t}{\t}gms; + # accept '-' as placeholder for undefined + if ($value eq '-') { + $value = undef; + } + if (grep { $_ eq $key } @$allowedKeys) { $dataHash{$key} = $value; } elsif (grep { $_ eq $key } @$allowedAttrKeys) { -- cgit v1.2.3-55-g7522