Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: CGI and persistent data

by astroboy (Chaplain)
on Aug 28, 2009 at 00:17 UTC ( #791780=note: print w/ replies, xml ) Need Help??


in reply to CGI and persistent data

I'd like to be able to 'carry' the data structure without having to 'store' it to disk, if possible

well, you'll have to store the data structures somewhere. Your choices will probably be in a cookie, as a hidden param or as part of your session, And session info will typically either use a flat file or a db. As porta pointed out, you could just use CGI::Session or CGI::Application::Plugin::Session to do the latter. That would be my recommendation too, as it has a nice API for saving and retrieving the data.


Comment on Re: CGI and persistent data
Re^2: CGI and persistent data
by stevieb (Chaplain) on Aug 28, 2009 at 00:40 UTC

    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

      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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://791780]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-12-27 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls