Hi, there are many great classical OO-design responses above.
I would use Moo (never Moose!) and Roles. (You can also apply Roles to any class or object using Role::Tiny.
Kills me but no time now to show an SSCCE for robots, but there are plenty of great examples around. I recommend SuperSearching this site for examples of Moo usage provided by tobyink (many use farm animals or humans, but I should think you can easily frobnicate that schema to your own :-) )
Hope this helps!
In reply to Re: How to sub class-es
by 1nickt
in thread How to sub class-es
by exilepanda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |