I've taken a liking to setting up a centralized config that puts various
package globals where I want them
# contents of Foo::Config
{
package Foo::Zip;
use vars qw($got $no $guitar $strings);
$got='ernie';
$no='ball';
$guitar='or';
$strings='markly';
}
{
package Foo::Zap;
use vars qw($bang $boom $bash);
# etc
}
I'll likely use constant.pm next time I rev the code instead of using
vars.
-Ian
Scott Alexander wrote:
>
> I'm working on creating a site that is completely done in mod perl.
>
> The area that I'm running into problems with is using a single
> module to store configuration information. ie where images are
> stored. oracle settings, color codes etc. All the settings that are
> valid accross the entire site.
>
> The way i've been trying to do this is to create a module
> Mf7::Globals and then store the data inside.
> I then have an Initialize_globals function that I run to reset all the
> variables at the begining of a request.
>
> I thought I should be able to access them using
> $Mf7::Globals::imgserver but this just errors out with unitialized
> variable.
>
> So what method are you guys using to store sitewide variables?
>
> Scott
--
Salon Internet http://www.salon.com/
Manager, Software and Systems "Livin' La Vida Unix!"
Ian Kallen <[EMAIL PROTECTED]> / AIM: iankallen / Fax: (415) 354-3326