Cheers for the input.

The object will be used by people I don't trust :) so I'm not giving them direct access to the hash, hence it also being "private" - it'll be used a lot by front-end guys working in TT, and thankfully that forces privacy of the methods.

It'll also be used by people writing scripts (before/after TT), to set the contents of the hash before saving the state of it.

This main class will have several of these types of lists, and other simpler attributes.

I'd always previously just used a list in these circumstances, then moved to a hash for quicker lookups and less loops in checking the contents, and now using the Traits with Moose.

I've added the trait handles as I've been writing a script that needs them, gradually moving more and more towards to the Moose way of doing things.

Just wanted to make sure I wasn't going off on the wrong tangent, or maybe I've mis-understood something.

Thanks again, all greatly appreciated.


In reply to Re^2: Moose Design Thoughts (Traits) by Cagao
in thread Moose Design Thoughts (Traits) by Cagao

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.