From d8696956453b6604f6541ffabfdebe7321599dea Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 24 Oct 2013 23:31:14 +0100 Subject: [PATCH] Allow more characters in keys. --- Webperl/ConfigMicro.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Webperl/ConfigMicro.pm b/Webperl/ConfigMicro.pm index e44f554..2a10049 100644 --- a/Webperl/ConfigMicro.pm +++ b/Webperl/ConfigMicro.pm @@ -139,16 +139,16 @@ sub read { $section = $1; # Attribues with quoted values. value can contain anything other than " - } elsif($line =~ /^\s*([\w:-]+)\s*=\s*\"([^\"]+)\"/ ) { + } elsif($line =~ /^\s*([\w. :-]+)\s*=\s*\"([^\"]+)\"/ ) { $self -> {$section} -> {$1} = $2; # Handle attributes without quoted values - # or ; at any point will mark comments - } elsif(!$self -> {"inline_comments"} && $line =~ /^\s*([\w:-]+)\s*=\s*(.+)$/ ) { + } elsif(!$self -> {"inline_comments"} && $line =~ /^\s*([\w. :-]+)\s*=\s*(.+)$/ ) { my $key = $1; $self -> {$section} -> {$key} = $2; $self -> {$section} -> {$key} =~ s/^\s*(.*?)\s*$/$1/; - } elsif($self -> {"inline_comments"} && $line =~ /^\s*([\w:-]+)\s*=\s*([^;#]+)/ ) { + } elsif($self -> {"inline_comments"} && $line =~ /^\s*([\w. :-]+)\s*=\s*([^;#]+)/ ) { my $key = $1; $self -> {$section} -> {$key} = $2; $self -> {$section} -> {$key} =~ s/^\s*(.*?)\s*$/$1/;