handle bad config lines better

This commit is contained in:
Isaac Connor 2013-11-06 17:02:01 -05:00
parent fe829e7a4b
commit f4dfd88d9f
1 changed files with 5 additions and 1 deletions

View File

@ -78,7 +78,11 @@ BEGIN
{
next if ( $str =~ /^\s*$/ );
next if ( $str =~ /^\s*#/ );
my ( $name, $value ) = $str =~ /^\s*([^=\s]+)\s*=\s*(.+?)\s*$/;
my ( $name, $value ) = $str =~ /^\s*([^=\s]+)\s*=\s*(.*?)\s*$/;
if ( ! $name ) {
print( STDERR "Warning, bad line in $config_file: $str\n" );
next;
} # end if
$name =~ tr/a-z/A-Z/;
*{$name} = sub { $value };
push( @EXPORT_CONFIG, $name );