[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Re: PARAMS and CAP::ConfigAuto


----- Original Message ----- 
From: "Mark Stosberg" <suppressed>
To: <suppressed>
Sent: Monday, February 20, 2006 4:40 PM
Subject: [cgiapp] Re: PARAMS and CAP::ConfigAuto


> On 2006-02-19, Jonathan Mangin <suppressed> wrote:
> > 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??
> 
> Did you upgrade the Config::Auto plugin and your app broken? 
> That shouldn't have happened. What version are you using? 
> 
> The "must call" error isn't even in 1.30. 
> 
> I'd have to guess that you are using an older version of the module, but
> reading the documentation of a newer version on search.cpan.org. 
> 
>     Mark
> 
You are correct about version (1.00) and search.cpan.org.
The real problem was I'd never used PARAMS and couldn't find in
any CA docs how to use the values. Plenty on how to set values.
It's working now.

Thanks. I will upgrade soon.
--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.