I'm no expert but since no one already answered this I'll give it a try.
It seems to me that the problem you might encounter is that your protection will work fine for AbstractClass, but not for any abstract child of AstractClass. If you keep this in mind, it should work.
About a better way to do it, I don't know but I'm not sure it is a good idea to redefine "BUILD" for this kind of thing. What about just putting your exception in the constructor?
sub new { die "attempt to instanciate an abstract class" }In reply to Re: Abstract class under MooseX-Declare
by grondilu
in thread Abstract class under MooseX-Declare
by greengaroo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |