Re: [Cgi-session-user] CGI::Sesion works incorrectly
Brought to you by:
sherzodr
From: Sergey B. <si...@gm...> - 2006-07-23 13:27:26
|
Hi, Mark. I've run your tests. The results is ok 1 - session starts out undef ok 2 - session is true after getInstance not ok 3 - multiple call to getInstance return the same session ID 1..3 As I see the problem not in CGI::Session and SessionSingleton. Problem is in initizliaing session. After first call session object has internal status = 1, after the second call internal status is changing to 2. Session object with status 2 is normal session object. My SessionSingleton always returns session object with status 1, it never richs status 2. To use CGI::Application::Plugin::Session I have to create separate package, but I wouldn't like it. I just want to use SessionSingleton in simple script (not in package). > Sergey, > > It's frustrating that you haven't followed up on the advice given to > you of writing some tests. Here are some tests I wrote for the case. > Do they pass for you when you run these tests in a file? > > If they do, your problem is elsewhere, or you need to write a new test > to share with us that illustrates your problem. If the tests don't pass, > check that you are using the latest version of CGI::Session. > > Finally, consider using CGI::Application and > CGI::Application::Plugin::Session instead! They are a lightweight, > proven solution to provide a singleton for a CGI::Session object. > > Mark > |