Nikola,
Do you have any code for processing a config file and/or an example
config file?
Here's a hash that I think is tough to transalte into a config file:
%mar_omc_and_mms = (
'clt' => { 'omc2' => [qw(mm3 mm4)] },
'clt1x' => { 'omc1' => [qw(mm101 mm102)],
'omc3' => [qw(mm5 mm6 mm7)] },
'gvl' => { 'omc1' => [qw(mm1 mm2)],
'omc2' => [qw(mm3 mm4)] },
'col' => { 'omc1' => [qw(mm1 mm2)] },
'rdu' => { 'omc1' => [qw(mm1 mm2)] },
'gso' => { 'omc1' => [qw(mm1 mm2)] },
'chs' => { 'omc1' => [qw(mm1 mm2)] }
)
Maybe it could look like this:
[CLT]
omc2= mm3, mm4
[CLT1X]
omc1 = mm101, mm102
omc3 = mm5, mm6, mm7
....and so forth...
But, do you have any suggestions on how to read this in and store it the
same way, or a better way of storing it or formatting the config file?
Thanks,
Kevin
On Tue, 2002-07-16 at 11:55, Nikola Janceski wrote:
> I still think you are safer with a config file.
> With a module they can screw up the script so when it fails they will be
> calling you.
> with a config file you can program in the error checking.
>
>
> > -----Original Message-----
> > From: Kevin Old [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 16, 2002 11:48 AM
> > To: [EMAIL PROTECTED]
> > Subject: Perl constants with modules
> >
> >
> > Hello all,
> >
> > I am writing a script for a client and they have requested an easy way
> > to configure their script.....without having to enter the script code
> > itself.
> >
> > I'm not to crazy about using a config file like VARIABLE=VALUE, so I
> > thought that since I am using a module anyway, why not have the values
> > they might want to ever change in the top of the module. These are
> > thigns like paths and number values, that are separate from
> > the command
> > line parameters that are passed in when the script is run each time.
> >
> > First, is this a good idea?
> >
> > Second, which sytax (in your opinion) should I use?
> >
> > $CDMA::USER = "myusername";
> >
> > or
> >
> > use constant USER => "myusername";
> > (called like CDMA::USER.....correct?)
> >
> > Any help is appreciated.
> >
> > Thanks,
> > Kevin
> >
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ----------------------------------------------------------------------------
> --------------------
> The views and opinions expressed in this email message are the sender's
> own, and do not necessarily represent the views and opinions of Summit
> Systems Inc.
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]