Stripping trailing space from configuration values
This commit is contained in:
parent
7b7fac78b3
commit
bb601b5fa6
5
ConfigMicro.pm
Normal file → Executable file
5
ConfigMicro.pm
Normal file → Executable file
@ -126,8 +126,9 @@ sub read {
|
||||
|
||||
# Handle attributes without quoted values - # or ; at any point will mark comments
|
||||
} elsif($line =~ /^\s*([\w\-]+)\s*=\s*([^\#;]+)/ ) {
|
||||
$self -> {$section} -> {$1} = $2;
|
||||
|
||||
my $key = $1;
|
||||
$self -> {$section} -> {$key} = $2;
|
||||
$self -> {$section} -> {$key} =~ s/^\s*(.*?)\s*$/$1/;
|
||||
# bad input...
|
||||
} else {
|
||||
close(CFILE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user