in reply to Re^3: Introspection of Moose/Mouse attributes fails to find native trait with `does`
in thread Introspection of Moose/Mouse attributes fails to find native trait with `does`
Perl's DOES defaults to ISA since Perl can't distinguish between base classes and roles/traits.
Perl 5's DOES defaults to isa() because I wrote it that way, because I understand Liskov's substitution principle.
If DOES means "Can I treat this invocant as if it were an object of that type?" (and it does), then clearly an object which is an instance of that type or a subclass of that type should return a true value for that question.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Introspection of Moose/Mouse attributes fails to find native trait with `does`
by ikegami (Patriarch) on Aug 24, 2011 at 23:36 UTC | |
by chromatic (Archbishop) on Aug 24, 2011 at 23:59 UTC | |
by perigrin (Sexton) on Aug 25, 2011 at 01:38 UTC |