Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
You're right, I was confusing "abstract base class" with "interface role".

That documentation mainly talks about interface roles, but in the sentence "Because the role defines the required methods directly, adding a base class to the mix would not achieve anything" presumably refers to the fact that class<-(role or abstract class)<-interface-role won't work if you only meet your interface-role requirements in the child class. "base class" in that sentence should probably be "abstract class or role". The document is really warning that you should instead use class<-interface-role plus class<-(role or abstract class).

Now if I've understood that correctly, it's still a not explaining the behavior which I'm seeing. If both has and with are evaluated at runtime and not compile-time, putting them in the correct order should mean that a role can fulfill requirements set by another role, with either a subroutine or a Moose attribute, and not only with a subroutine. I don't care that we veered off-topic, because this taught me something, so thanks!


In reply to Re^8: Moose role with requirement consuming another role by Boldra
in thread Moose role with requirement consuming another role by Boldra

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-04-16 18:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found