I've been happy using Class::MethodMaker, and using the easily defined accessors / setters for all
access into the object, both from outside, from inside (the class itself), and from any subclasses. Then nobody steps on anyone else. And given all the convenience functions C:MM offers, I'm not tempted to cheat and push stuff into hash directly.
You won't find the eight characters
in my code, as I never go into $self as a hash. In fact, CMM could migrate itself to inside-out objects or blessed pumpkin bread or whatever, and I wouldn't even notice.
The only downside I can see to this is speed, but my apps are all disk-IO-bound anyway, so the extra wrapper calls don't matter a whit.
Your mileage may vary--
water, water, everywhere
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||