Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Not completely into Moose yet, but isn't a role the equivalent of a Java interface?

    In that case, the behaviour you describe has been implemented there as a intended feature: a regular class *implements* the interface.

    Additionally, a role seems to also have the function of an abstract class as well. In Java, overriding concrete methods is, again, a feature you want.

    If you don't want to override a method simply do not include a overloading method in the implementing class.

    It looks like a (sensible) design dec

    • Oh, and I forgot to respond to this bit:

      If you don't want to override a method simply do not include a overloading method in the implementing class.

      Easier said than done. When I am overriding a role's method but I don't know I'm overriding it, I would like to know that. Really. It's important to me. That's a huge part of the OO inheritance mess that roles are designed to avoid and here's one relatively common edge case that is ignored. So maybe I should just remember all of my method names? I don't think so:

      $ find lib/ -name '*.pm' |wc -l
           549