Bug 1007938: MySQLConfig doesn't support end-of-line comments

Patch provided by Kaiwang CHEN (~kaiwang-chen) on Launchpad.
This commit is contained in:
Brian Fraser fraserb@gmail.com
2012-06-11 12:33:45 -03:00
parent 87f32cc857
commit d387b22c07
3 changed files with 15 additions and 2 deletions

View File

@@ -337,8 +337,9 @@ sub _parse_varvals {
ITEM:
foreach my $item ( @varvals ) {
if ( $item ) {
# Strip leading and trailing whitespace.
# Strip leading and trailing whitespace, and trailing comments.
$item =~ s/^\s+//;
$item =~ s/[#;].*$//;
$item =~ s/\s+$//;
}