in reply to Moose for "web 1.0" types

Role and traits are the same thing. Roles weren't introduced by Moose. Outside of Moose, you might have used Class::Role or Class::Trait.

Roles, Mixins and (Java) Interfaces are alternatives to unrestricted multiple inheritance.

Replies are listed 'Best First'.
Re^2: Moose for "web 1.0" types
by stvn (Monsignor) on Sep 03, 2009 at 13:34 UTC
    Role and traits are the same thing.

    For some definition of "traits" that is. To clarify, Traits were the original idea developed by the Smalltalk people and which I implemented in Class::Trait. In Moose however we use trait differently, it has come to mean "role applied to an instance" and sometime specifically to a meta-level instance.

    Roles weren't introduced by Moose

    Exactly they were one of the many features we borrowed from Perl 6 :)

    -stvn