On 10/22/06, James Abbott <[EMAIL PROTECTED]> wrote:
Hi Folks,

I'm just revisiting an old C::A based app to add some new goodies, and
as part of this set about upgrading the underlying C::A modules, since
they've remained static since the site went live. I installed new
versions of C::A with CAP::Apache, CAP::DBH and CAP::Session into my
development tree, rather than the system perl libs, which are being used
by the 'live' version of the app, and added an appropriate 'use lib' to
my startup.pl (called from httpd.conf). A few debug statements have
shown that the newly installed versions are being used in preference to
the old modules.

All is not well though....hitting the apps launch page using the new
modules gives me:

[Sun Oct 22 09:20:57 2006] [error] Error executing class callback in
init stage: Can't locate object method "cookie" via package
"Apache::Request" at [trimmed]/CGI/Application/Plugin/Session.pm line
41.\n

That error is occuring because CAP::Session is expecting an object
that provides a 'param' method and a 'cookie' method much like CGI.pm
does.  However, Apache::Request only provides the 'param' method and
makes you handle cookies in a different way.

A simple solution is to use the
CGI::Application::Plugin::Apache::Request module as your query object.
This is a simple wrapper around Apache::Request which provides an API
that is similar to CGI.pm and hence should work properly with
CAP::Session.

Cheers,

Cees

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