Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

GT::Session::File problems

Quote Reply
GT::Session::File problems
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.
  1. 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.

  2. no correct method, to check existance of a session. Tough it is possible through this code:
    Code:
    # Load a session
    my $session = new GT::Session::File ( $id ) or die "Can't load session: '$id'.";
    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.
    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.

  3. The recommended way by doc is, to set directory path using this code:
    Code:
    # Set session directory
    my $session = new GT::Session::File ( directory => '/path/to/sessions', id => $id );
    However it is bad, since creates new session file, which will be not used for anything.

    Recommended way should be:
    Code:
    $GT::Session::File::DIRECTORY = $sessions_path;

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

Last edited by:

webmaster33: May 8, 2003, 9:22 AM
Subject Author Views Date
Thread GT::Session::File problems webmaster33 4997 May 8, 2003, 9:15 AM
Thread Re: [webmaster33] GT::Session::File problems
Paul 4860 May 8, 2003, 12:11 PM
Thread Re: [Paul] GT::Session::File problems
webmaster33 4860 May 8, 2003, 1:27 PM
Thread Re: [webmaster33] GT::Session::File problems
Paul 4920 May 8, 2003, 1:54 PM
Thread Re: [Paul] GT::Session::File problems
webmaster33 4854 May 8, 2003, 2:49 PM
Thread Re: [webmaster33] GT::Session::File problems
Paul 4842 May 8, 2003, 2:52 PM
Thread Re: [Paul] GT::Session::File problems
webmaster33 4911 May 8, 2003, 2:56 PM
Post Re: [webmaster33] GT::Session::File problems
Paul 4896 May 8, 2003, 3:17 PM
Post Re: [webmaster33] GT::Session::File problems
webmaster33 4858 May 8, 2003, 3:11 PM
Post Re: [webmaster33] GT::Session::File problems
webmaster33 4870 May 8, 2003, 3:20 PM
Post Post deleted by webmaster33
webmaster33 4851 May 9, 2003, 11:13 AM
Thread Re: [webmaster33] GT::Session::File problems
webmaster33 4833 May 18, 2003, 9:35 AM
Thread Re: [webmaster33] GT::Session::File problems
Paul 4852 May 18, 2003, 10:24 AM
Thread Re: [Paul] GT::Session::File problems
webmaster33 4857 May 18, 2003, 11:18 AM
Thread Re: [webmaster33] GT::Session::File problems
Paul 4789 May 18, 2003, 11:37 AM
Post Re: [Paul] GT::Session::File problems
webmaster33 4827 May 18, 2003, 11:45 AM