h***@gmail.com
2013-12-27 16:52:56 UTC
Curently, the LoadConfig() method in Configure.pm does not allow trailing comments, such as
region=cbhn # London
I propose changing the regex on L81 in Configure.pm from:
my( $key, $sign, $value ) = ($line=~ /^(\S+)([=!])(.*?)\s*$/ );
to:
my( $key, $sign, $value ) = ($line=~ /^(\S+)([=!])(.*?)\s*(#.*)?$/ );
AFAICS this will only cause a problem if a grabber actually uses the # character as a genuine part of a value. I would think that unlikely?
LoadConfig() also insists that comments start in col 1. I propose a relaxation of this requirement by changing L74 from:
next if $line =~ /^#/;
to
next if $line =~ /^\s*#/;
Your comments please?
Thanks,
Geoff
region=cbhn # London
I propose changing the regex on L81 in Configure.pm from:
my( $key, $sign, $value ) = ($line=~ /^(\S+)([=!])(.*?)\s*$/ );
to:
my( $key, $sign, $value ) = ($line=~ /^(\S+)([=!])(.*?)\s*(#.*)?$/ );
AFAICS this will only cause a problem if a grabber actually uses the # character as a genuine part of a value. I would think that unlikely?
LoadConfig() also insists that comments start in col 1. I propose a relaxation of this requirement by changing L74 from:
next if $line =~ /^#/;
to
next if $line =~ /^\s*#/;
Your comments please?
Thanks,
Geoff