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

Re: [cgiapp] cgi_minimal compatible?


I do not know CGI::Minimal, but CGI::Application does not use the
HTML-producing functions of CGI.pm.

Thanks. CGI::Minimal is just a way to get access to CGI vars without
accepting all the more popular things CGI.pm gives.

$q->header(%header_props)

I'm *very* weak with Perl's object programming. Can you tell me how I would
wrapper "CGI::Minimal" and add the "header()" method?

Three options (in recommended order):

a) use CGI.pm. I cannot really believe that the overhead of its additional features is significant in any way.
It does load most of its features on demand anyway.

b) Add the header() function to CGI::Minimal.
You do not need to make a wrapper class (unless you want to put in more stuff).
Since this is Perl, you can just add methods to classes at runtime:

sub CGI::Minimal::header{
	my ($self, %params) = @_;
	...
}
(in your CGI::Application subclass)

c) Tell CGI::Application not to output headers,  but print them yourself

$app->header_type('none')



Thilo


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