Work continues on script at (code)) Cisco Pass Mass - IOS (deprecated by node 123464) - next on list is moving many config parameters to external config file.   Lots o' good info at PM on such doings.   AgentM and arturo both ++ for good info in ChatBox.

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:

  1. Config file format can't include markup or Perl code.   (must be editable by "code illiterate" support staff)
  2. Parser must run on Linux and WinNT4, possibly AIX and Sun also.
  3. Parsing can be done using CPAN modules.

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

In reply to Cross-platform config file parsing by ybiC

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.