Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
So why does MooseX::Traits (which has your name on it) use hacks to achieve exactly that effect?

This is the fun part about Open Source, just cause my name is on it doesn't mean I have done anything other then contribute some part of it and I am no way responsible for the contents ;)

The configuration of trait_namespace will inherit. If you don't like that, why not just use a simple package variable in the package of the object's original created type?

Well, in this case, inheritability is nice, but the goal here is more configurability of subclasses without altering the core MooseX::Traits itself (which would have global effects, which are bad bad bad).

I suppose someone else maintained it and added that bit... but how would you (or how did you originally) do it, in keeping with your stated design philosophy?

I am pretty sure jrockway wrote that part, it is not how I would approach it but this solution is not all that bad (I have seen worse). Keep in mind too that was also written quite a while ago, today one would accomplish this type of thing by making MooseX::Traits into a parameterized role using MooseX::Role::Parameterized.


In reply to Re^3: Moose: What about "class" attributes? by stvn
in thread Moose: What about "class" attributes? by John M. Dlugosz

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, 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
  • 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.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (4)
    As of 2020-11-28 05:28 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found