On 06/28/2011 09:54 PM, Stefan Certic wrote:
I am more looking for a solution to read data with perl and convert to some
native data structure, like hash reference, or multidimenzional array, so i
can access and change data in form of: $named_conf_file->{view1}-{zoneblah} =
'somedata' and then dump it back into original format.
Ok, that didn't really come across in your email.
http://augeas.net/
...does what you want. It has a "lense" (their term for a config file
description) for ISC dhcpd, which is a very similar syntax. It should be
relatively trivial to turn out a lense for ISC bind.
Or use Config::Parser, or adapt the script I sent round (which in fact
was the reason I wrote it); tokenisation of the bind config file is
easy, and the core grammar is straightforward because everything is
;-terminated, with the form:
item = thing+ block semicolon
thing = word | quoted-string
block = { item+ }
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
from this list
bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users