How does one get the results of calling freeze to print properly to a web page? Properly in this case would mean that I could stick the data in a hidden field in a form. Then submit the serialized object back to the web server and thaw it out.

I believe this is really a question of printing 'strange' characters to the web browser since I can write $foo to a file. Also, I can tell the print is writing the entire object due to the amount of time it takes for the page to load...strange.

use Storable qw(nstore store_fd nstore_fd freeze thaw dclone);

$obj = Really::Big::thingy->new();
$foo = freeze $obj;
print $foo # I want to print this to the browser;


In reply to Writing frozen objects to a browser? by kenpo

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.