Trying to follow the docs in CAP::ConfigAuto moving cfg_file
definition to the instance script:
#!/usr/bin/perl -wT
use lib qw(.);
use App1;
my $webapp = App1->new(PARAMS => {cfg_file => 'config/app1.conf'});
$webapp->run();
And in Base.pm:
use CGI::Application::Plugin::ConfigAuto (qw/cfg cfg_file/);
sub cgiapp_init {
my $self = shift;
# $self->cfg_file('config/app1.conf');
my $DB_NAME = $self->cfg('DB_NAME');
<snip>
The error:
[Sun Feb 19 11:02:10 2006] [error] [client 192.168.1.1] must call
cfg_files() be
fore calling cfg(). at
/usr/local/lib/perl5/site_perl/5.8.5/CGI/Application/Plug
in/ConfigAuto.pm line 113...
I guess I'm confused about where to 'use CAP::ConfigAuto' and
reading the PARAMS hash? Or??
Thanks,
Jon
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.