For error checking I meant your constructor can be called with incorrect/missing size or “bad” invocant and won’t complain then will complain “cryptically” and not from caller’s perspective on its methods (but only if warnings are on); e.g.: Argument "camel" isn't numeric in numeric eq (==) at Package line number…

Your counter examples are spot on and if stevan couldn’t convince you Moose is a good tool there is no way I ever could. :P The traits give you more flexibly and depending on the package add exactly one line of code. Whereas the aliasing you’re doing would add up to hundreds to achieve the same thing and would not be properly overridable/inheritable/mixable/requirable, Unstandardized and probably untested. Types doing any number of complicated checks and validation with just a line as well and one more to do something like upgrade "http://asfd.qwer" to isa(URI). My examples being mostly toy code is not making a terribly good case I know… :| Since the stuff is just Perl more just Perl can be shown to do the same-ish; we haven’t talked around/after/before either which is quite a bit harder in plain Perl, especially in a way that can be altered or overidden in consuming classes. Some of the strength is that Moo/Moose and friends come with docs, tests, community: consistency and support and extensibility; DRY too. I find it much easier to debug than YAOO system or series of inconsistent idioms executed by 5 different hackers on a code base, all with their own style and rationale.


In reply to Re^10: The future of Perl? by Your Mother
in thread The future of Perl? by BrowserUk

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.