How can I set a static variable that can be accessed by all subclasses of the same base class (Perl/Moose)?
问题 Since Perl/Moose always calls the base class' BUILD function before it calls the subclass BUILD function, there is a new instance of the base class everytime you instantiate a subclass. How do I go about creating a static variable that can be used by all the subclasses, or alternatively how can I create a static base or abstract class? (does that approach even make sense?) I'm trying to create a variable that dynamically enables or disables certain features of a function defined at run-time