This software functionality helps define methods for instance variables within a class, enabling improved customization and organization of code.
To define instance variables, you simply provide a list of variable specifications when invoking the module. A specification is a tuple containing the variable type (e.g. hash, scalar, list, etc.) and its associated name. The name must conform to Perl's identifier naming rules.
The module automatically generates a suite of methods for each instance variable types. These methods get assigned to the calling class and mostly have the variable name as part of their identifier. In this document, we refer to the instance variable name as inst_var.
In your class constructor, you must utilize the beget class method to initialize and instantiate each class instance. Class::Methodist makes this process super smooth for you.
In summary, if you need a simple yet powerful module for defining instance variables and their corresponding methods, look no further than Class::Methodist. Its intuitive interface, sensical semantics, and versatility make it a fantastic choice for multiple use cases.
Version 1.6: N/A