Sort of a hodgepodge of questions here:

As I noted here, I do NOT have mod_perl access with my ISP. To complicate matters, I'm working on a CGI/mysql application that must run on various platforms (*NIX, Windose/ActiveState, and possibly OS-X). Assuming $]>=5.6 is a very bad thing in this instance. 5.005 is more like it.

For the sake of speed, I'd like to create persistent DBI handles, and possibly persistent statement-handles, with some sort of "?" placeholders to handle the dynamics of the various select/insert/update queries.

Looking at CPAN, usenet, and the Monestery yields a basketful of options. But I'm not sure what the best would be for my needs:

  • I would like for the necessary module(s) to be pure-perl, for ease of installation (eg, copy someFile.pm)
  • Obviously, it has to handle blessed refs
  • I've not determined a storage method yet, so I'd like it to be concise, just to be safe. One thought I've had was to use Crypt::??? or some funky sprintf/pack combo to garble/encrypt the string, and store it in a cookie.
  • If all of my blessed objects are "the same" (ie - same dbName, userName, password for DBI->connect), couldn't I just store the serialized strings in a .pl file as scalars, read them in via require, and thaw/eval as needed? Of course, this file would be above the document root.
  • And of course, speed is paramount. If it weren't, I wouldn't be persisting!

    Any assistance, pointers, literature-links, etc, regarding this manner, as always, is greatly appreciated.

    ÅßÅ×ÅßÅ
    "It is a very mixed blessing to be brought back from the dead." -- Kurt Vonnegut

    In reply to /^mod_perl/ && Persistent DBI by abaxaba

    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.