Hi all,

This is my first post here...

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

Steve


In reply to CGI and persistent data by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.