Allow whitespace and other special characters in generate expressions from arrays

This commit is contained in:
Matthias Schiffer 2014-02-23 06:01:35 +01:00
parent e4bd85bff5
commit 5fb924193d

View File

@ -13,7 +13,7 @@ sub add_config {
add_config($key . '.', $val);
}
elsif (ref($val) eq 'ARRAY') {
$config{'@' . $prefix . $key . '@'} = join ' ', @{$val};
$config{'@' . $prefix . $key . '@'} = join ' ', map {s/'/'\\''/g; "'" . $_ . "'"} @{$val}
}
unless (ref($val)) {
$config{'@' . $prefix . $key . '@'} = $val;