in reply to Abstract Methods in Moose
Perhaps MooseX::ABC is what you are looking for?
You should be able to extend your abstract base class with other abstract classes too (like you show in your example in here). You should also note that roles can be composed of other roles, so this will do what your looking for:
package WidgetRole; use Moose::Role; requires 'get_widget_type'; package AbstractWidget; use Moose::Role; with 'WidgetRole'; package SnazzyWidget; use Moose; with 'AbstractWidget'; sub get_widget_type{ "BasicWidget" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Abstract Methods in Moose
by crashtest (Curate) on Dec 12, 2009 at 21:06 UTC | |
by stvn (Monsignor) on Dec 13, 2009 at 00:38 UTC | |
by stvn (Monsignor) on Dec 20, 2009 at 13:33 UTC |