Tanalis has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I'm writing a script that will be generating a large number of similar reports, each of which has its own format header and body.
I'd like to export all of these formats to a dedicated ReportsFormats module, simply to make the script easier to follow and look less cluttered.
I'm after advice and opinions, I guess - is it valid to have a module of formats, how would I go about exporting them (Exporter in the usual way?) and how could I go about avioding the problem of the Perl compiler not finding the variables in the formats because they're not local to the format module itself (though I suppose not using strict is an option there).
Any advice/suggestions would be appreciated. This isn't fundamental .. but I hate cluttered code and for the sheer number of formats we use doing it this way would make it much, much easier to understand and maintain the script.
Thanks in advance
-- Foxcub
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Modules of Formats
by robartes (Priest) on Oct 01, 2002 at 09:55 UTC | |
Re: Modules of Formats
by Aristotle (Chancellor) on Oct 01, 2002 at 10:09 UTC | |
Re: Modules of Formats
by Jaap (Curate) on Oct 01, 2002 at 09:47 UTC | |
Re: Modules of Formats
by broquaint (Abbot) on Oct 01, 2002 at 11:00 UTC | |
by Anonymous Monk on Nov 11, 2012 at 14:27 UTC | |
Re: Modules of Formats
by shotgunefx (Parson) on Oct 01, 2002 at 10:12 UTC | |
Re: Modules of Formats
by joe++ (Friar) on Oct 01, 2002 at 11:22 UTC |