bradcathey has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monasterians,
I'm trying to set up a test scenario of for a larger application that will have several called modules and one "super class", hence the 3 chunks of code.
I've set up this test in two places: 1) my shared hosting account at Pair Networks, 2) my dedicated server (running Apache2, Debian 4). It will write a cookie at Pair, but not on my dedicated. The only thing I can come up with is that there is some module at Pair that is making the difference. Anyway, here's what I have.
Instance script in the root
#!/usr/bin/perl use warnings; use strict; use lib "/var/www/dspx/"; use Cookietest; my $app = Cookietest->new(); $app->run();
Super class
package Cookiesuper; use strict; use lib '/var/www/dspx/'; use CGI::Carp qw(fatalsToBrowser); use base 'CGI::Application'; use CGI::Application::Plugin::Session; sub cgiapp_init { my $self = shift; $self->session_config( DEFAULT_EXPIRY => '+4h', COOKIE_PARAMS => { -expires => '+4h', -name => 'DSO_Cookietes +t' }); } 1;
Called module
package Cookietest; use strict; use base 'Cookiesuper'; sub setup { my $self = shift; $self->start_mode('s'); $self->mode_param('rm'); $self->run_modes( 's' => 'somesub', ); } sub somesub { my $self = shift; $self->session->param('test' => 'dso'); return; } 1;
What am I totally missing, or what can I look for, test for to get this working? Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CAP::Session not writing cookie
by wfsp (Abbot) on Nov 22, 2007 at 09:02 UTC | |
|
Re: CAP::Session not writing cookie
by jbert (Priest) on Nov 22, 2007 at 09:49 UTC |