Subject: | parsing does fail if value string does include a block identifier |
Date: | Fri, 8 Jun 2018 15:00:57 +0200 |
To: | bug-Config-General [...] rt.cpan.org |
From: | "Peter Heuchert" <peter.heuchert [...] de.ibm.com> |
After years of using Config::General I got a problem with this simple
config file:
test block <br />
the error message is : Config::General: EndBlock "</br>" has no
StartBlock statement (level: 1, chunk 2)!
I'm using version 2.63
The trouble maker seems to be in method _read on line 691:
if (!$this->{ApacheCompatible} && /\s*<([^\/]+?.*?)\/>\s*$/) {
The regex does not look for blocks at the beginning of the line. It accept
any location of a block statement. So I changed it to
if (!$this->{ApacheCompatible} && /^\s*<([^\/]+?.*?)\/>\s*$/) {
This solved the problem
Mit freundlichen Grüßen / Kind regards
Peter Heuchert