Wow -- I didn't realize you what you were doing under the hood before. I browsed the code. If I understand it correctly in my quick skim -- you're using the inside-out object technique, but storing all the accessor data in a lexical in the Class::BuildMethods file scope, keyed off the package that imported Class::BuildMethods and the instance refaddr. That's an extra hash lookup versus handwritten inside-out objects, but I guess lighter-weight overall than Class::Std without all the constructor crud.
However, I think it will still be subject to the thread/winfork and serialization issues. That probably ought to noted in the docs and you might want to consider using CLONE as noted in Threads and fork and CLONE, oh my! and marking it as safe for 5.8 only.
Still, that's a great example of what can be achieved with independence from the underlying implementation -- and why that's a useful feature. I'll probably use it as an example in the seminar.
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
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:
Outside of code tags, you may need to use entities for some characters:
- 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.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||