Re: using a module to contain settings.

2000-06-24 Thread Ged Haywood
Hi all, On Thu, 22 Jun 2000, Frank Wiles wrote: Where I work we store them as PerlSetVar's in the Apache config, we store all implementation specific things in there such as the page title, the URL to the module we are using, database user and password, etc, etc. Like Frank I've used

Re: using a module to contain settings.

2000-06-23 Thread Stas Bekman
On Thu, 22 Jun 2000, 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

Re: using a module to contain settings.

2000-06-23 Thread Peter Schoenster
- Original Message - From: Scott Alexander [EMAIL PROTECTED] 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

Re: using a module to contain settings.

2000-06-23 Thread Perrin Harkins
On Fri, 23 Jun 2000, Scott Alexander wrote: package Mf7::Globals; use strict; use vars qw($VERSION); my ( $imgserver, ); $VERSION = '0.01'; sub Initialize_globals { $imgserver = 'http://www.musiciansfriend.com'; } 1; Okay, this is an easy one. You are declaring

Re: using a module to contain settings.

2000-06-23 Thread Scott Alexander
On 22 Jun 2000, at 17:51, Perrin Harkins wrote: On Thu, 22 Jun 2000, Scott Alexander wrote: I then have an Initialize_globals function that I run to reset all the variables at the begining of a request. Why would you reset all of your configuration globals at the beginning of a request?

Re: using a module to contain settings.

2000-06-23 Thread Craig McLane
You could also export the variables (in which case @EXPORT_OK is preferable to @EXPORT). It still needs to be a global variable, but you won't need to refer to it with a fully qualified name. Craig On Fri, 23 Jun 2000, Perrin Harkins wrote: On Fri, 23 Jun 2000, Scott Alexander wrote:

Re: using a module to contain settings.

2000-06-23 Thread Scott Alexander
On 23 Jun 2000, at 13:27, Perrin Harkins wrote: On Fri, 23 Jun 2000, Scott Alexander wrote: Okay, this is an easy one. You are declaring $imgserver as a lexical (my) variable. When Perl finishes executing this file, lexical variables go out of scope. You can fix this by making it a real

using a module to contain settings.

2000-06-22 Thread Scott Alexander
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.

Re: using a module to contain settings.

2000-06-22 Thread Frank Wiles
.--[ Scott Alexander wrote (2000/06/22 at 17:08:06) ]-- | | So what method are you guys using to store sitewide variables? | `- Where I work we store them as PerlSetVar's in the Apache config, we store all

Re: using a module to contain settings.

2000-06-22 Thread Ian Kallen
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