ybiC has asked for the wisdom of the Perl Monks concerning the following question:
Looks to me like a roll-yer-own parser can best fit the requirements, with Config::IniFiles a possible second choice. So I ask for review of my findings, and perhaps example(s) of a roll-yer-own parser to help me get started on the right foot.
cheers,
Don
striving for Perl Adept
(also tired, bleary-eyed, and quite possibly subject to incoherent rambling)
Requirements:
Relevant PM nodes from Super Search:
Potential modules/methods to parse config file:
Config file would be something like this:
(param=value's read into scalars)
(others read into arrays)
[parm commands] snmp-server community RO=notpublic timeout=10 [noparm commands] logging buffer errors logging console errors logging trap errors [no snmp-server community] public private secret bogus [targets] routerA routerB.sub1.dom switchA.sub2.dom switchB.sub2.dom 10.1.2.3 172.16.1.1 172.31.254.254 192.168.105.55
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cross-platform config file parsing
by ChOas (Curate) on Oct 30, 2000 at 14:02 UTC | |
by ybiC (Prior) on Oct 30, 2000 at 20:45 UTC | |
|
Re: Cross-platform config file parsing
by cianoz (Friar) on Oct 30, 2000 at 17:26 UTC | |
|
Re: Cross-platform config file parsing
by Fastolfe (Vicar) on Oct 30, 2000 at 19:45 UTC | |
by ybiC (Prior) on Oct 30, 2000 at 20:18 UTC | |
by Fastolfe (Vicar) on Oct 30, 2000 at 20:23 UTC | |
by ybiC (Prior) on Oct 31, 2000 at 21:38 UTC | |
by Fastolfe (Vicar) on Oct 31, 2000 at 21:48 UTC |