AG> I hope, you got the idea. The plugin1() run mode behaves as if it were
AG> described in package MyApp due to 'export', while the code is separate and
AG> can be reused in many CGI::Application classes. It is not even necessary
AG> to use CGI::Application in the package Plugin, because all
AG> CGI::Application features come with the $self variable. Package Plugin
AG> has to be used from another CGI::Appclication class, unless it is a valid
AG> CGI::Application class by itself. This solution is roughly what I was
AG> looking for.
I see. This is question of reusability in some C::A applications
inside one project. In any case, this is not that i mean talking about
"Multy-Level" :)
AG> It appears from other discussions on the list that people prefer to avoid
AG> complete integration of large applications into one large CGI::App class
AG> due to performance considerations. I think, it is reasonable, but may be
AG> irrelevant for Fast CGI. Let me know, what you think.
This is it! Yes!
Most of people prefer have one instance script for each C::A
application. In FastCGI environment this is not the best solution.
The question:
What the best way for handling several C::A classes in one script?
1.
if( $query->param('module') eq 'module1' ) {
my $app = MyApp1->new();
$app->run();
}
elsif( $query->param('module') eq 'module2' ) {
my $app = MyApp2->new();
$app->run();
}
It's so ugly!
2.
my %hash = (
module1 => \&MyApp1->do(),
....
)
Is there some standart solution?
For example, Multy Level CGI Application :)
Great thanks for your response!
Aleksey
AG> Sincerely,
AG> Arkady.
AG> On Tue, 15 Apr 2003, Aleksey Serba wrote:
>> Hello Arkady, Sebastian, Greg and Darin!
>>
>> I plan using CGI::Application with FastCGI and i've encountered the similar questions.
>>
>> What the best way to develope "multilevel" CGI::Application?
>> I don't like Arkady's way (playing with ENV variable and run
>> parameters), cause it's not so clear, to my mind.
>> If we'll consider "sub applications" like _different_ applications,
>> then all fine. But the question about multilevel apllication is still
>> remain :(
>>
>> Or i just try to invent a wheel again? :)
>>
>> Thanks in advance.
>>
>> Aleksey
>>
>>
>> ---------------------------------------------------------------------
>> Web Archive: http://www.mail-archive.com/suppressed/
>> To unsubscribe, e-mail: suppressed
>> For additional commands, e-mail: suppressed
>>
>>
--
Best regards,
Aleksey mailto:suppressed
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
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.