in reply to Re: CGI and persistent data
in thread CGI and persistent data

Thanks porta and astroboy,

I'll look further into keeping sessions via the modules you've recommended, particularly the ones that fall into plugins to CGI:Application. I've found so far that the documentation has been reliable and easy-to-follow for plugins related to this module path.

Cheers,

Steve

Replies are listed 'Best First'.
Re^3: CGI and persistent data
by Sewi (Friar) on Aug 28, 2009 at 07:07 UTC
    If you want to store them in RAM and access them easily, think about storing them as files in /dev/shm. This gives you the advantages of memory (fast, don't care about old data after reboot) and the easiness of file access.
    Whichever solution you're using: Always remember cleaning up old items.

      This is my point

      I'm curious to learn whether I can access the data within leaked memory if I *don't* clean up the old items, particularly across Perl invocations, simply by using the known memory address

      Steve

        Woah, bad perl-fu going on there. I can't see it working, at least not in any concievably portable way. The /dev/shm method gives you access at the speed of memory; why try to roll your own?

        As an alternate suggestion, if you really do want to code something yourself instead of using the previously suggested CGI::Application::Plugin::Session -- Try using FastCGI. You gain persistence of your program, so you can just use standard Perl variables to store session info.

        $,=' ';$\=',';$_=[qw,Just another Perl hacker,];print@$_;