From: Wiggins d'Anconia <[EMAIL PROTECTED]>
> Possibly time to step in here and suggest XML rather than creating
> some new or using some pre-existing config file standard. I am not an
> XML zealot, in fact I have been rather resistant to it for a while,
> but this sounds like opportunity knocki
Possibly time to step in here and suggest XML rather than creating some
new or using some pre-existing config file standard. I am not an XML
zealot, in fact I have been rather resistant to it for a while, but this
sounds like opportunity knocking for it.
That way "coming up with parsing algori
Kevin Old wrote:
> 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.
> Second, which sytax (in your opinion) should I use?
>
> $CDMA::USER = "myusername";
>
> or
>
> use constant USER => "
On Jul 16, Kevin Old said:
>Do you have any code for processing a config file and/or an example
>config file?
There are plenty of config-file modules on CPAN. Search for "config" at
http://search.cpan.org/.
>%mar_omc_and_mms = (
> 'clt' => { 'omc2' => [qw(mm3 mm4)] },
> 'clt1x' => { 'omc1' =
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--
Kevin,
I have found, with experience, with clients who need to have scripts written,
that are going to need some sort of global variables assigned to be used by
various script, to use a separate configuration file or module. This prevents
the client from messing up the main script(s) for your pro
On Jul 16, Michael Pastore said:
>$Split1 = "@ARGV[2]";
>$Split2 = "@ARGV[3]";
>$WorkPath = "@ARGV[4]";
>$DataPath = "@ARGV[5]";
Useless use of quotes on @ARGV[2].
Scalar value @ARGV[2] better written as $ARGV[2].
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
On Jul 16, Kevin Old said:
>$CDMA::USER = "myusername";
vs.
>use constant USER => "myusername";
>(called like CDMA::USER.correct?)
Well, it's really quite a trifle. I would stick with variables (as
opposed to constants) unless you REALLY need the benefit of a constant.
--
Jeff "japhy" P
, 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.
>
>
Kevin,
You could consider using input parameters as well...
$Split1 = "@ARGV[2]";
$Split2 = "@ARGV[3]";
$WorkPath = "@ARGV[4]";
$DataPath = "@ARGV[5]";
so that when running from the command line they would be passed after the
..pl
HTH,
Mike
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For ad
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 v
11 matches
Mail list logo