[Nagiosplug-devel] RFC: Plugins config file (final proposal)

Gavin Carr gavin at openfusion.com.au
Mon Feb 5 23:10:00 CET 2007


On Mon, Feb 05, 2007 at 03:07:45PM +0000, Ton Voon wrote:
> 
> On 5 Feb 2007, at 14:49, sean finney wrote:
> 
> > however, over the weekend i started hacking out a bit of code for the
> > ini parsing...  perhaps it was a bit premature to do so given what
> > you've said,  but it does mean the wheel is already half-re-invented.
> > with comments and natural use of whitespace it's currently 178 LoC,  
> > and
> > would probably be less than 2x that to finish it.  the iniparser  
> > LoC is
> > an order of magnitude larger (~2000 just for the src dir), fwiw  :)
> 
> I like to think I give more consideration to people that have  
> something to show - Gavin did some research into the "replacement  
> inline" and said it was hard to do in perl, so that swayed decisions  
> about switching to "defaults from config file".
> 
> I'm happy to go with your parser and see where it takes us.
> 
> Can we hold off finalising the syntax of the config files? I'm  
> wondering if we need to compare with the perl implementation. Gavin,  
> would you like to recommend a perl module to use? I'd like to be  
> involved in the test cases to ensure the same config file works  
> across languages.

There are a zillion ini-parsing modules in perl (of course). I'd 
recommend we start with Config::Tiny, which is the super-minimalist 
version, but should probably still do what we want here.

I'll dig out the branch where I'd started looking at this and see if
I can get a perl version up in the next couple of days.

Cheers,
Gavin





More information about the Devel mailing list