summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorAndrew Gaffney <agaffney@gentoo.org>2007-12-24 02:29:48 +0000
committerAndrew Gaffney <agaffney@gentoo.org>2007-12-24 02:29:48 +0000
commitc57661aed688963c59cea8ed1429381d1c73dac0 (patch)
tree55e9feb37fcdac455ea99dff7e2ab261df7add79 /client
parentok, where to begin.... (diff)
downloadscire-c57661aed688963c59cea8ed1429381d1c73dac0.tar.gz
scire-c57661aed688963c59cea8ed1429381d1c73dac0.tar.bz2
scire-c57661aed688963c59cea8ed1429381d1c73dac0.zip
use a match and capture instead of split for parsing config file lines
svn path=/branches/new-fu/; revision=257
Diffstat (limited to 'client')
-rwxr-xr-xclient/scireclient.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/scireclient.pl b/client/scireclient.pl
index 3e03049..47fd7b9 100755
--- a/client/scireclient.pl
+++ b/client/scireclient.pl
@@ -96,8 +96,9 @@ sub read_config {
while (<FH>) {
chomp;
next if /^\s*(?:#|$)/;
- my ($key,$val) = split /=/;
- $conf{lc($key)} = $val;
+ if(/^\s*(.+?)\s*=\s*(.+?)\s*(?:#.*)?$/) {
+ $conf{lc($1)} = $2;
+ }
}
close(FH) or die("Couldn't close the config file ${SCIRE_CONFIG_FILE}: $!");
}