I need to store user preferences...

Currently, there are only two user preferences and these are stored as fields in the User table of the database. However, the number of preferences is going to increase. I guess there will be around 20 or so eventually. Experience suggests that most users won't change most of their preferences from the default setting. Therefore, I don't really want to add all the preferences to the User table when nearly all of them will be set to the default values.

I could implement the preferences in the database with an EAV model. But I wondered if Perl's core Storable might be a better solution.

I've not used Storable before so I'd appreciate the monastic wisdom about any issues I might face using Storable generally and it's suitability for this specific application...


In reply to 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.