Home > Archive > PERL Beginners > May 2007 > How best to modularise with strict
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How best to modularise with strict
|
|
|
| I have a fairly large script that uses strict and has a signifcant
number of global variables declared at the beginning with our.
I would like to move them all in to a separate file in order to
simplify layout.
What is the recommended method, if indeed it is possible?
| |
| Brad Baxter 2007-05-21, 9:59 pm |
| On May 20, 8:26 am, kenTk <k...@shail.co.uk> wrote:
> I have a fairly large script that uses strict and has a signifcant
> number of global variables declared at the beginning with our.
> I would like to move them all in to a separate file in order to
> simplify layout.
> What is the recommended method, if indeed it is possible?
I would suggest a config file.
--
Brad
| |
| eishbut@googlemail.com 2007-05-23, 4:00 am |
| On May 21, 4:08 pm, Brad Baxter <baxter.b...@gmail.com> wrote:
> On May 20, 8:26 am, kenTk <k...@shail.co.uk> wrote:
>
>
> I would suggest a config file.
>
> --
> Brad
Use a config file and read the contents of the config file into a
hash.
| |
|
| On May 23, 8:49 am, "eish...@googlemail.com" <eish...@googlemail.com>
wrote:
> On May 21, 4:08 pm, Brad Baxter <baxter.b...@gmail.com> wrote:
>
>
>
>
>
> Use a config file and read the contents of the config file into a
> hash.
Thanks.
I actually do that for one set of parameters, but the hash really has
to be global. I admit that it could be a private hash of an object and
read and written with accessors, but that would certainly slow the
many reads that are made. Its also a lot more work!
| |
|
| On May 23, 8:49 am, "eish...@googlemail.com" <eish...@googlemail.com>
wrote:
> On May 21, 4:08 pm, Brad Baxter <baxter.b...@gmail.com> wrote:
>
>
>
>
>
> Use a config file and read the contents of the config file into a
> hash.
Thanks.
I actually do that for one set of parameters, but the hash really has
to be global. I admit that it could be a private hash of an object and
read and written with accessors, but that would certainly slow the
many reads that are made. Its also a lot more work!
| |
|
| On May 23, 8:49 am, "eish...@googlemail.com" <eish...@googlemail.com>
wrote:
> On May 21, 4:08 pm, Brad Baxter <baxter.b...@gmail.com> wrote:
>
>
>
>
>
> Use a config file and read the contents of the config file into a
> hash.
Thanks.
I actually do that for one set of parameters, but the hash really has
to be global. I admit that it could be a private hash of an object and
read and written with accessors, but that would certainly slow the
many reads that are made. Its also a lot more work!
Ken
| |
|
| On May 23, 8:49 am, "eish...@googlemail.com" <eish...@googlemail.com>
wrote:
> On May 21, 4:08 pm, Brad Baxter <baxter.b...@gmail.com> wrote:
>
>
>
>
>
> Use a config file and read the contents of the config file into a
> hash.
Thanks.
I actually do that for one set of parameters, but the hash really has
to be global. I admit that it could be a private hash of an object and
read and written with accessors, but that would certainly slow the
many reads that are made. Its also a lot more work!
Ken
| |
|
| On May 23, 8:49 am, "eish...@googlemail.com" <eish...@googlemail.com>
wrote:
> On May 21, 4:08 pm, Brad Baxter <baxter.b...@gmail.com> wrote:
>
>
>
>
>
> Use a config file and read the contents of the config file into a
> hash.
Thanks.
I actually do that for one set of parameters, but the hash really has
to be global. I admit that it could be a private hash of an object and
read and written with accessors, but that would certainly slow the
many reads that are made. Its also a lot more work!
Ken
| |
|
| On May 23, 8:49 am, "eish...@googlemail.com" <eish...@googlemail.com>
wrote:
> On May 21, 4:08 pm, Brad Baxter <baxter.b...@gmail.com> wrote:
>
>
>
>
>
> Use a config file and read the contents of the config file into a
> hash.
Thanks.
I actually do that for one set of parameters, but the hash really has
to be global. I admit that it could be a private hash of an object and
read and written with accessors, but that would certainly slow the
many reads that are made. Its also a lot more work!
Ken
| |
|
|
|
|
|