[Cgi-session-user] re: calling flush automatically
Brought to you by:
sherzodr
From: Mark S. <ma...@su...> - 2005-08-13 03:58:45
|
I looked more into the issue of why flush wasn't being called automatically by the recent poster, and also compared the behavior of 3.x and 4.x and this regard. Here's the test script I played with: #### use File::Spec; use Test::More qw/no_plan/; use strict; use CGI::Session; my $dir = File::Spec->catdir('t', 'sessiondata'); my $id; { my $ses = CGI::Session->new(undef,undef,{Directory=> $dir }); $id = $ses->id(); ok($id, "found session id"); } ok(-r "$dir/cgisess_".$id, "found session data file"); #### With both 3.x and 4.x, both the tests will pass, meaning the session is being flushed automatically. Remove the brackets to provide the scope, and the second text fails (for both versions). Mark -- http://mark.stosberg.com/ |