For scalability and efficiency, a database solution is probably the best. That's based on the 2 to 20 or so preferences that you mentioned; assumes a number of users, now or in the future, totalling in the 100s, 1000s, or more; and also assumes preferences are stored server-side, not client-side. I'd have different advice if those assumptions are incorrect — let us know.

G'day Ken,

You are spot on with your assumptions 😀

Yes, you are right. The database solution is going to be right for this purpose. I had come across Storable mentioned a few times recently both here and in other places and thought it might be a good solution as it keeps the preferences in Perl. But I am not keeping any of the other data within Perl that is held in a database so why shouldn't preferences?

Perhaps it was shiny penny syndrome...


In reply to Re^2: Storable for user preferences by Bod
in thread Storable for user preferences by Bod

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.