develooper Front page | perl.beginners | Postings from August 2009

Re: AW: CGI and persistent data (without Storable)

Thread Previous
August 28, 2009 05:20
Re: AW: CGI and persistent data (without Storable)
Message ID:
2009/8/28 Steve Bertrand <>:
> Thomas Bätzler wrote:
>> Steve Bertrand <> asked:
>>> I'm writing a web interface using CGI::Application for a project that
>>> houses numerous methods within a dozen modules.
>>> One particular process displays a template to the user with passed in
>>> data, and then has four more steps before completing. The result of this
>>> procedure will be the modification of an elaborate data structure. The
>>> data structure may need to be modified along the way.
>>> Given that I can get through the web GUI portion of the process with
>>> just a couple of params, I'd like to find a way to retain the entire
>>> data structure without having to re-instantiate it (which requires
>>> rebuilding numerous objects etc), or pass each variable within it as a
>>> param on each CGI invocation.
>>> Can I, and is it plausible to create a cyclic ref redundancy of the data
>>> structure, store the memory location in a variable, pass the variable
>>> data as a param, and then recreate the data based on the variable that
>>> contains the memory location at the end of the entire CGI process? Is
>>> exploiting Perl's garbage collection like this possible, and ok to do?
>>> I'd like to be able to 'carry' the data structure without having to
>>> 'store' it to disk, if possible

I have not experience of it myself, but I believe that memcache is
often used for this type of thing. Alternatively you have to use
hidden fields in the form and carry them from page to page. Writing to
disk isn't that *bad. I wouldn't write the idea off completely (no pun


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About