throop has asked for the wisdom of the Perl Monks concerning the following question:
I have a large program which processes batches of text files (derived from MS-Word, .pdf, Excel etc.) For each batch, there's an initialization file. Right now, the details of each initialization get wrapped inside a function. This illustrates what I have currently:
I'm imagining I need something like:sub RqtInitSABER{ my($Args) = @_; $runSwitches = {topArgs => { fileReadFn => \&eat_AvionicsFMEA, hiliteCol => [1,3,4,5], xtraTh => {1 => {colspan=>2, text=> ' '}, 3 => {colspan=>4, text=> 'Front'}}}, flamencoArgs => spec => # For what goes in the flamenco/specifications.py file +. {PAGE_TITLE => 'SABER Requirements', PAGE_HEADING => 'SABER Software Requirements Oct Release', }
I want to change this to a declarative .ini style. I've looked at Config::Simple and Config::IniFiles. But I can't figure out how to do a few things. I need to have:[topArgs] fileReadFn= eatAvionicsFMEA hiliteCol= [1,3,4,5] [[xtraTh]] [[[1]]] colspan=2 text=' ' [[[3]]] colspan=4 text='Front' [flamencoArgs] [[spec]] PAGE_TITLE = SABER Requirements PAGE_HEADING = SABER Software Requirements Oct Release
rather thanhiliteCol= [1,3,4,5]
hiliteCol=1 hiliteCol=3 hiliteCol=4 hiliteCol=5
with the whitespace on the right being significant seems like a very bad idea.text=
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Finding the right initialization-file module
by GrandFather (Saint) on Dec 13, 2011 at 00:57 UTC | |
by throop (Chaplain) on Dec 13, 2011 at 20:09 UTC | |
by GrandFather (Saint) on Dec 13, 2011 at 21:40 UTC |