On 3/14/02 6:11 AM, "Cory Trese" <[EMAIL PROTECTED]> wrote:
> List --
>
> Thank you in advance for any time spent reading or replying, I appreciate
> it. I'm developing a large application using CGI::Application (or at least
> thinking about it very seriously.) The application we are going to create
> will need to serve many users, and groups of users will need to have
> different sets of configuration options.
>
> GOALS:
> 1. These options should be easy to use within the framework of
> CGI::Application
> 2. These options should be stored in a central location
>
> Thoughts:
>
> I've considered a number of options, but never having done any serious
> CGI::Application programming, I am in no position to make any type of
> judgment.
>
>
I would suggest creating a "Configuration" module/class that'll handle the
reading and writing of a file or database. Your main application can
instantiate an object of this class (or one of it's subclasses), and then
you can use a reference to it throughout your CGI::Application app. Ala:
my $config = MyModules::Configuration->new();
open USERFILE, $config->param('userinfo');
<blah, blah, blah .... >
Using a configuration module/class allows you to subclass it for all your
various needs, and it's use isn't tied to CGI::Application, you could use it
in other applications/scripts
Hope this helps,
-jerry
+---------------------------+
| Jerry Hamlet |
| Web Designer/Programmer |
| www.hamletzone.com |
| [EMAIL PROTECTED] |
+---------------------------+
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]