Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: CGI and persistent data

by astroboy (Chaplain)
on Aug 28, 2009 at 00:17 UTC ( [id://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.

Replies are listed 'Best First'.
Re^2: CGI and persistent data
by stevieb (Canon) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://791780]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-03-29 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found