On Thu, 21 Oct 2004 13:43:27 -0400, Michael <[EMAIL PROTECTED]> wrote:
Sean Davis wrote:
This is my own naivete--what other plugins are affected by such a move? CGI::Session--I think it just needs a "param" method form the query object? DBH will work just fine, I assume? Others?
As far as I know, other existing plugins shouldn't have many problems. The CGI::Session plugin might have a problem if I don't try implement the header_add and header_props methods...
The Session plugin will call the 'param' and 'cookie' methods on the query object that is passed in to try to retrieve the value of the session ID.
It also calls header_add to try to add a cookie header to the outgoing headers.
The 'param' method is ok. The 'cookie' and 'header_add' might be a different story.
Apache::Request doesn't have a cookie method, and using header_add with my plugin will cause it to use CGI.pm instead of Apache::Request.
I do have something to propose that might make this easier...
I can have my plugin set the CGIAPP_PLUGIN_APACHE environment variable. Then any other plugins can see that and act accordingly. For instance, you could check for this env var before setting a cookie to either use CGI.pm's cookie() or use Apache::Cookie(). Then you could either use header_add() or query->header_out() to add it. Thoughts?
This might actually be a way for all plugins to communicate with each other. We had a previous discussion about whether some plugins might want to be able to detect if others where there. For instance, an auth and session plugin. Other thoughts?
-- Michael Peters Developer Plus Three, LP
--------------------------------------------------------------------- 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]
