Using 'extends', you can safely subclass. It doesn't guarantee much (yet) in the way subclassing non-Moose stuff, but

But that is, unfortunately, exactly the issue. Almost every class framework in Perl works fine as long as you consistently use that framework.

Can Moose be (safely) subclassed without extends? Can Moose subclass a non-Moose class? If so, I applaud highly. But, as you say, it's still 0.03_02... there's a long way to go until the OP's questions are fully addressed.

If you can show me how Moose could be used to subclass, say, File::Marker, then I'll be a believer, but short of that, I think it's a nice wrapper around all the old problems.

It's a very nice wrapper and will work for most people for most things, I'd bet, but it's not a fundamental change in the way that I think inside-out objects are. (And as I said, those should be used with caution too.)

-xdg

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.


In reply to Re^4: Perl 5 OOP solutions by xdg
in thread Perl 5 OOP solutions by tomazos

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.