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

[cgiapp] Re: Calling CGI::Application::Plugin::ConfigAuto from cgiapp_init


On 2004-12-13, Cees Hek <suppressed> wrote:
>
>> # In my instance script
>> my $app = WebApp->new(PARAMS => { cfg_file => 'config.pl' });

> # the call to cfg_file should not be needed here!
> # $app->cfg_file('config.pl');

That's right. After trying it, I no longer recommend having this method
in the instance script precisely because the config data can't be
accessed in cgiapp_init().

> I would suspect that the 'cfg' method could be changed to look at
> $self->param('cfg_file') if the user hasn't already called cfg_file (I
> haven't looked at the code for the plugin so I don't know for sure).
>
> So you can set things up normally using $self->cfg_file('config.pl'),
> OR you could configure it when you create your application object
> using
>
> my $app = WebApp->new(PARAMS => { cfg_file => 'config.pl' });
>
> But like I said, the plugin author would have to add this
> functionality to CAP::ConfigAuto for this to work.

The plugin author is listening. :) That's a good idea.

    Mark

-- 
http://mark.stosberg.com/ 


---------------------------------------------------------------------
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.