Bug#309721: patch
Jason Thomas
Jason Thomas <jason@debian.org>, 309721@bugs.debian.org
Thu, 19 May 2005 17:43:33 +1000
tags 309721 patch
thanks
Heres a patch that seems to get rid of the errors. Not sure if it breaks
functionality but it works for me.
It does not handle trailing '\'. This would require some sort of state
and temporary buffer.
--- ConfigFile.pm.orig 2005-05-19 16:47:22.129242392 +1000
+++ ConfigFile.pm 2005-05-19 17:41:14.547840072 +1000
@@ -261,7 +261,7 @@
# Split up the key and the value. The @val regexp code dynamically
# differentiates between "space strings" and array, values.
- my($key, $r) = m!^\s*\s*(\w+)\s*(?=\s+)(.*)!; # split up key
+ my($key, $r) = m!^\s*([^\s]*)(.*)!; # split up key
my(@val) = $r =~ m!\s+(?:"([^"]*[^\\])"|([^\s,]+))\n?!g; # split up val
@val = grep { defined } @val; # lose undef values