|Welcome to the Monastery|
An odd Config::General parsing problemby hacker (Priest)
|on Oct 04, 2008 at 02:52 UTC||Need Help??|
hacker has asked for the
wisdom of the Perl Monks concerning the following question:
Or so I thought.
I found an edge condition that seems to be cropping up more and more in the Makefile targets I'm preprocessing, that breaks the standard parsing behavior of this module.
Further reading of the pod indicates that this module allows me to subclass the split operations, using -SplitPolicy and -SplitDelimiter. I've tried various incantations, but I can't seem to find the right magical mojo to make it do what I need.
So I'm here, asking if there are any other monks (or modules) that might be able to help me here. Here's some code that exhibits the problem:
And the perl that processes this:
When I process this using the code above, I get the following result:
Note how THIS_BREAKS sucks the next lines up into its value container? That shouldn't happen, especially with the additional line break after the multi-line continuation.
I tried using -SplitDelimiter to compensate for this with some basic and complex regular expressions, without much success.
I looked into Config::General::Extended and it seems to have a bit more granular control over the hash keys and values, but I'd rather not do that kind of autopsy on the module's classes if I don't have to.
Is there another way to do this? Thanks in advance, my fellow brethren.