On 2004-11-10, Michael <suppressed> wrote:
> Problem:
>
> I have upgraded an application to use CGI::Application::Plugin::Apache
> which, if you haven't seen changes you app to use Apache::* modules
> instead of CGI.pm. I also wanted to use the
> CGI::Application::Plugin::Session module as well since it's easy to use
> and clean. But it uses the CGI.pm cookie() method to generate the cookie
> to glean the session id and to create a new cookie for the headers.
>
> Now CAP::Apache does a lot to make sure it can handle headers generated
> like this but the query object (since it's an Apache::Request object)
> doesn't have a cookie() method.
>
> A proposed solution would be to modify CAP::Session to either check the
> type of object that $query is and only use the cookie() method if it's
> CGI.pm, else use CGI::Cookie since that's what CGI uses under the hood
> anyway) or it could even check to see if the $ENV{MOD_PERL} is set and
> if it is, use Apache::Cookie, else use CGI::Cookie.
Using CGI::Cookie sounds like it makes sense in any case.
- Those who use CGI.pm will already have it.
- Those who prefer to avoid CGI.pm won't have to load the whole thing.
OTOH, under mod_perl, I can't see it making much difference. You
have to install CGI.pm to get CGI::Cookie (right?) and there shouldn't
be much performance penalty if CGI.pm is in memory already and just
passes back and forth with CGI::Cookie.
Another idea: see if the query object has a cookie method instead of
checking the package name, making that part of the solution more
general.
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.