in reply to Parse::RecDescent trouble
says you have section which have either a server or a key and no more. So it stops as soon as it parses one of these. If you exchange the order of the lines, as in:section: server | key
you're gonna see it parses the tsig-key line correctly but ignores the next one. You need something like that:print Dumper $parse->section (' tsig-key "/etc/bind/rndc.key" bind-server 127.0.0.1 ');
with some extras to get the data structure you want.section: (server | key)(s)
Update: the real problem was spotted by davorg in Re: Parse::RecDescent trouble — $parse->section was being used instead of $parse->config. I've got confused by the rule name "section" to hold a single part ("key" or "server"). I expected a config to contain sections and sections to contain (possibly) multiple parts ("key" or "server").
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Parse::RecDescent trouble
by ribasushi (Pilgrim) on Jan 12, 2007 at 12:30 UTC |