Hi Kenny & All,
Kenny Pyatt spoke:
>When we use global configuration files we use Config::General from CPAN to
>manage Apache style config files. We normally do this for applications we
>expect to install more than once. We store database access information
(i.e.
>username, password, database name, server info), the install path, etc.
This is the information I was looking for :-) I also am using
Config::General to store all of my configuration information
(paths and what not) and tring to pass them down.
>In regard to CGI::App, We load the returned config::general hash into
>param() via setup in our CGI::App superclass to pass the info down to
inherited
>classes.
Let me see if I have this correct.
you have a Superclass.pm that has
sub setup {
my $self = shift;
use Config::General;
$conf = new Config::General(
-ConfigFile =>
'/app/apache-1.3.27/cgi-bin/uganswer/bin/UGVars.cfg',
-InterPolateVars => 1,
-ExtendedAccess => 1,
);
$config_dirs = $conf->obj("dir");
$self->params($config_dirs);
}
and then you have a application.pm that does something like
my $config_dirs = $self->params($config_dirs);
Is this basiclly correct? If not, do you have a sample of how you have
chosen to set it up?
>We often setup a DBI connection with the params from the config file
>and pass the DBI object into param(). As a general rule we never put
things
>that change after the install in a config file.
>Sincerely,
>Kenny Pyatt
I have one more question, I have seen a lot of posts about HTML::Template
and a few for template toolkit. CGI-Application uses the HTML:Template as
the
default is there any plans to incorporate template toolkit into
CGI-Application? Has anyone done this? IF so how?
Thanks
Ron Hill
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]