I'm not sure I understand your objection to pre-loading the databases. If you want to improve on startup time over in-memory hashes, then you're going to have to have the data somewhere else first, which means you have to pre-load the data.

If you aren't doing that, then you are populating your data to memory first before it gets put into your hashes, and you aren't getting an initial startup time benefit. That's okay, since you'll get the benefit on subsequent uses, but there's also no reason you couldn't implement such a solution using e.g. Tie::DBI rather than pre-loading the data. After all, a tied hash that you couldn't add to wouldn't be very useful.

In short, it seems all of your options are interchangable depending on how you implement them. The difference is in how you want to write your implementation.

In reply to Re: Tie Hash by bellaire
in thread Tie Hash by BioLion

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.