Skip Menu |

This queue is for tickets about the Apache-Admin-Config CPAN distribution.

Report information
The Basics
Id: 127332
Status: new
Priority: 0/
Queue: Apache-Admin-Config

People
Owner: Nobody in particular
Requestors: g.sampolski [...] ogicom.pl
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: the _parse subroutine is too restrictive for opening tags
Date: Wed, 10 Oct 2018 17:18:23 +0200
To: bug-Apache-Admin-Config [...] rt.cpan.org
From: Grzegorz Sampolski <g.sampolski [...] ogicom.pl>
Hi. I think the _parse sub is too restrictive. For example for mod_version opening tag: <IfVersion > 2.4.4> _parse will return error "syntax error". It is because it search up to first occurance of `>' char, but should search for the last: diff --git a/a/Config.pm b/b/Config.pm index 160ea19..e6e34e1 100644 --- a/a/Config.pm +++ b/b/Config.pm @@ -1630,7 +1630,7 @@ sub _parse # it's a directive _insert_directive($level[-1], $1, $2, $raw_line, $length); } - elsif($line =~ /^<\s*(\w+)(?:\s+([^>]+)|\s*)>$/) + elsif($line =~ /^<\s*(\w+)(?:\s+(.+?)\s*|\s*)>$/) { # it's a section opening my $section = _insert_section($level[-1], $1, $2, $raw_line, $length); I know the problem exists in 0.94, and 0.95 versions. Could it be fixed? Best regards. Grzegorz Sampolski.