diff options
author | Oliver Tappe | 2008-01-12 17:36:39 +0100 |
---|---|---|
committer | Oliver Tappe | 2008-01-12 17:36:39 +0100 |
commit | 0def0a63955d3e41dc0090d762661cfcb31b091b (patch) | |
tree | 0d84cb749872db4d10aec991ae45f842dbd1fc07 /config-db | |
parent | * avoid possible warnings about undefined values in regex-substitution (diff) | |
download | core-0def0a63955d3e41dc0090d762661cfcb31b091b.tar.gz core-0def0a63955d3e41dc0090d762661cfcb31b091b.tar.xz core-0def0a63955d3e41dc0090d762661cfcb31b091b.zip |
* 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
Diffstat (limited to 'config-db')
-rwxr-xr-x | config-db/slxconfig | 8 |
1 files changed, 5 insertions, 3 deletions
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) { |