in reply to Attempt to uninherit method

The proper solution to your scenario is subroutines with empty bodies. That way, you're self-documenting that this method is not applicable to this subclass.

Have you thought about having a class factory (separate from an object factory)? You can indicate which methods are (and are not) applicable to a given subclass and let the factory figure out which methods to install based on class hierarchies. The factory code wouldn't be too hard to write - Class::MOP gives you a ton of introspection methods that simplify this kind of code to an iterator (provided for you) and a hash of method names.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?