> Christopher H. Laco wrote:
>> If I use the module in startup.pl, and have it load all of it's data at
startup, it that the instance all child processes will use?
>
> Yes, that's the best way to do it.
>
>> On a side note, I'm fairly comfortable with Perl/OOP at the
>> batch/command/cgi level, but the where's and whens of mod_perl still
leave me a bit unclear.
>
> It's mostly a question of understanding the lifecycle of the Apache
server.  You'll get it.
>
> - Perrin
>
>
In my limited understanding then,  in the startup.pl, one could do the
following:

use strict;
use MyMod::Config();

MyMod::Config::load();


What about existing components the are normally created in scripts using
new..
use strict;
use MyMod::Config();

my $config = MyMod::Config->new();

Since the use of globals is bad,  should existing things be converted to
pure packages instead of oop classes.

Is it prefered in the mod_perl world to create packages rather than classes?

What about statefull vs. stateless objects?

Thanks,
-=Chris



Reply via email to