Hi,

good idea, I think we need something to support Apache::Request.

I am not sure this needs to be implemented as a plugin, though.
Rather than overriding CGI::App's methods that call the query object, it would be nice to have
a wrapper around Apache::Request that supplies the "missing" methods.
That wrapper would function like a normal CGI.pm object for all the CGI::App cares.
It would work as a drop-in replacement, just like CGI::Simple.


I think this approach was discussed some time ago on this list,
but I could not find it right now.

_send_headers()
I didn't like the idea of exporting this private method (I'd rather
think it was a 'protected' not 'private) but right now it's the only way
to have any say in how the HTTP headers are created.

You would not have to change _send_headers() in that case.

cgiapp_get_query()
This overrides CGI:App's method for retrieving the query object. This is
the standard way of using something other than CGI.pm so it's no
surprise that we use it here. It simply creates and returns a new
Apache::Request object from "Apache->request".

In contradiction to saying this should not be a plugin before:
Once you have the wrapper class, overriding cgiapp_get_query() to instantiate it is a good idea.
Exporting this can be optional, though, as you can instead use the "query" parameter of new() to inject the wrapper.



HTTP Headers * Cookies

* Redirects

This could be dealt with transparently by the wrapper class, I guess. (You probably also need Dump() for the default runmode)



Sorry for offering all these ideas not backed by writing own code....


Thilo


--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to