This patch removes the error and makes the key available from the
object with no value.

not sure if its the right way to do it.


--- ConfigFile.pm.orig  2005-09-28 09:11:00.000000000 +1000
+++ ConfigFile.pm       2005-09-28 09:26:43.000000000 +1000
@@ -275,6 +275,7 @@
         # Split up the key and the value. The @val regexp code dynamically
         # differentiates between "space strings" and array, values.
         my($key, $r) = $confline =~ m!^\s*\s*(\w+)\s*(?=\s+)(.*)!;             
# split up key
+        ($key, $r) = ($confline, 1) unless $key;
         my(@val)     = $r =~ m!\s+(?:\"([^\"]*[^\\])\"|([^\s,]+))\n?!g;   # 
split up val
         @val = grep { defined } @val;                             # lose undef 
values
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to