Hi,
First of all: Sorry for completely forgetting about this bug!
Second:
I got a working branch @github - I think. Could you have a look and see
if it looks sensible?
This is the test, which is OK now. You can see in the bottom that the
parser now understands if/elsif/else as well as optionspaces. (without
encapsulation)
https://github.com/jhthorsen/net-isc-dhcpd/blob/rt-60044-with-conditions/t/90-60044-parse.t
Solution: For every Config:: class you have, there is also generated a
::Condition class. Example:
Config::Condition
Config::Subnet::Condition
Config::Host::Condition
This "config" class does the ConditionRole role, which has "type" and
"logic" attributes. Each of these condition classes can have the same
children as the "parent" Config class (meaning Config::Subnet::Condition
has the same children as Config::Subnet)
Conditions are not grouped. They are in series, like any other config
node. This means that you need to investigate, if you want to find
if+elsif+else, and do logic based on that group.
What do you think?