Hi,
I started using GT::Session::File module to manage sessions on my site.
Currently for some reasons, I don't want to use GT::Session::SQL, so please don't recommend me the SQL based session management.
I found that GT::Session::File module works strangely.
Did anybody else face such problems with GT::Session::File?
Alex, GT: do you plan improving the API interface of GT::Session::File in near future?
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
I started using GT::Session::File module to manage sessions on my site.
Currently for some reasons, I don't want to use GT::Session::SQL, so please don't recommend me the SQL based session management.
I found that GT::Session::File module works strangely.
- there is no separate method to read the session data. Tough using data() method, data read is possible, I think there should be also need a data_read() method to just read session data.
- no correct method, to check existance of a session. Tough it is possible through this code: but this still creates new sessions for each case when we do checking call & session is missing. It's not fine to create a dummy session file, just because we wanted to check session existance.Code:# Load a session
my $session = new GT::Session::File ( $id ) or die "Can't load session: '$id'.";
Yes, there could be possible to use if (-e $session_path/$session_id) for existance check, however why is the API if I have to do everything manually?
I assume this is a bug or a lack of session check feature.
- The recommended way by doc is, to set directory path using this code: However it is bad, since creates new session file, which will be not used for anything.Code:# Set session directory
my $session = new GT::Session::File ( directory => '/path/to/sessions', id => $id );
Recommended way should be:Code:$GT::Session::File::DIRECTORY = $sessions_path; - EDIT: One more bug: When printing out the session object using Dumper for debugging reasons, I see that the 'directory' value is missing, even if was previously set by $GT::Session::File::DIRECTORY = $sessions_path; code.
The 'directory' value should be always the actual value of $DIRECTORY variable!
Did anybody else face such problems with GT::Session::File?
Alex, GT: do you plan improving the API interface of GT::Session::File in near future?
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...