I always thought of roles as abstract sets of characteristics and not the individual characteritics. So all regexs would be do the REGEX (or Regexp if you want to split hairs) role. That implies that it can be used as a regex just like things that do the ARRAY role are arrays. Dereferencing isn't a role, its a part of a role and it all then depends on how you actualy define the roles. If you as anything that reports to do ARRAY has to be able to be dereferenced as an array then you don't need @{} and ARRAY you just need ARRAY. Like i said before if you are asking about one specific method (derferncing or otherwise) wouldn't you wan to use 'can'? I think a generic "what do you claim to do?" and can is a "what have you actualy implemented" and i think joining the two concepts is more magical and confusing than needed.


___________
Eric Hodges

In reply to Re^7: I don't understand UNIVERSAL::DOES() by eric256
in thread I don't understand UNIVERSAL::DOES() by rlb3

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.