I am trying to force all child classes of an Abstract Base Class to implement an interface. When I try add with '<interface>'
to the ABC, it requires me to implement the required methods immediately and add sub <method> {}
for each interface method.
To Illustrate the Problem,
package drawAPI {
use MooseX::Interface;
require 'draw';
one;
}
package shape {
use MooseX::ABC;
with 'drawAPI';
}
package square {
extends 'shape';
#here is where having a draw subroutine would be inforced
sub draw {};
}
Does anyone know a way to do this? or can recommend a different set of modules to accomplish this?
Thanks