MakeMe...atalog(3pm)
π NAME π
Class::MakeMethods::Docs::Catalog β the whole entire list of makable method types β¨
Ok so real talk, this page lives in the User Contributed Perl Documentation, section 3pm β that's the header we're working from (MakeMe...atalog(3pm), yes it's truncated, yes we're still slaying π
).
π DESCRIPTION π
Bestie. This doc is literally just the guest list π β it lists all the various subclasses of Class::MakeMethods that ship in this distribution, plus the method types each one hands you.
If you want the full tea on any single one of them, go read the documentation for that implementation β it's got the details on all the features it provides π«Ά
So for each class, there's a lil parenthetical comment that tells you whether the methods it generates apply to:
- individual blessed objects β that's Instances
- class data β that's Global
- or both β that's Any
π Scoping
The final part of the name of a method-generating subclass usually tells you the scope, aka the applicability, of the methods it generates. Vibe check time:
Hashβ for object instances based on blessed hashes with named values.Arrayβ for object instances based on blessed arrays with positional values.Scalarβ for object instances based on blessed scalars with a single value.InsideOutβ for any object instance regardless of underlying data type.Refβ for any object instance regardless of underlying data type.Inheritableβ for data which can be set at the class, subclass, or instance level.Classβ for class data shared by all instances but different for each subclassClassVarβ for class data shared by all instances but different for each subclassClassInheritβ for class data shared by all instances but different for each subclassGlobalβ for global data shared by a class and all its instances and subclassesPackageVarβ for global data shared by a class and all its instances and subclassesUniversalβ (no description given in the original, she's mysterious π«Ά)
ngl the source has a lil artifact right afterUniversalβ a stray line that reads exactly# General method types that are widely applicable. Not a scope, not a description, just vibes. But we keep everything here, so there it is β¨
π Summary Charts π
Chart one: which scopes each generator family has π
This table shows which scopes are available in each generator family:
Hashβ Basic+, Standard+, Evaled+, Composite+, Template+Arrayβ Basic+, Standard+, Evaled (nope), Composite+, Template+Scalarβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+InsideOutβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+Refβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+Inheritableβ Basic (nope), Standard+, Evaled (nope), Composite+, Template+Classβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+ClassVarβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+ClassInheritβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+Globalβ Basic+, Standard+, Evaled (nope), Composite+, Template+PackageVarβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+Universalβ Basic (nope), Standard (nope), Evaled (nope), Composite+, Template+
Chart two: which method types each family typically has π¦
This table shows which types of methods are typically available in each generator family:
newβ Basic+, Standard+, Evaled (nope), Composite+, Template+
scalarβ Basic+, Standard+, Evaled (nope), Composite+, Template+stringβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+string_indexβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+numberβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+booleanβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+boolean_indexβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+bitsβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+
arrayβ Basic+, Standard+, Evaled (nope), Composite+, Template+structβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+
hashβ Basic+, Standard+, Evaled (nope), Composite+, Template+hash_of_arraysβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+tiedhashβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+
objectβ Basic+, Standard (nope), Evaled (nope), Composite+, Template+instanceβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+array_of_objectsβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+
codeβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+code_or_scalarβ Basic (nope), Standard (nope), Evaled (nope), Composite (nope), Template+
πΈ BASIC CLASSES πΈ
π Basic::Hash (Instances)
Methods for objects based on blessed hashes. See Class::MakeMethods::Basic::Hash for details.
newβ create and copy instancesscalarβ get and set scalar values in each instancearrayβ get and set values stored in an array referred to in each instancehashβ get and set values in a hash referred to in each instance
π Basic::Array (Instances)
Methods for manipulating positional values in arrays. See Class::MakeMethods::Basic::Array for details.
newβ create and copy instancesscalarβ get and set scalar values in each instancearrayβ get and set values stored in an array referred to in each instancehashβ get and set values in a hash referred to in each instance
π Basic::Global (Global)
Global methods are not instance-dependent β calling them by class name, or from any instance or subclass, will consistently access the same value. Periodt. See Class::MakeMethods::Basic::Global for details.
scalarβ get and set a global scalar valuearrayβ get and set values in a global arrayhashβ get and set values in a global hash
π STANDARD CLASSES π
π§ Standard::Hash (Instances)
Methods for objects based on blessed hashes. See Class::MakeMethods::Standard::Hash for details.
newβ create and copy instancesscalarβ get and set scalar values in each instancearrayβ get and set values stored in an array referred to in each instancehashβ get and set values in a hash referred to in each instanceobjectβ access an object referred to by each instance
π§ Standard::Array (Instances)
Methods for manipulating positional values in arrays. See Class::MakeMethods::Standard::Array for details.
newβ create and copy instancesscalarβ get and set scalar values in each instancearrayβ get and set values stored in an array referred to in each instancehashβ get and set values in a hash referred to in each instanceobjectβ access an object referred to by each instance
π§ Standard::Global (Global)
Methods for manipulating global data. See Class::MakeMethods::Standard::Global for details.
scalarβ get and set global scalararrayβ get and set values stored in a global arrayhashβ get and set values in a global hashobjectβ global access to an object ref
π§ Standard::Inheritable (Any)
Methods for manipulating data which may be overridden per class or instance. Uses external data storage, so it works with objects of any underlying data type (iconic behaviour honestly). See Class::MakeMethods::Standard::Inheritable for details.
scalarβ get and set scalar values for each instance or class
π₯ COMPOSITE CLASSES π₯
π
Composite::Hash (Instances)
Methods for objects based on blessed hashes. See Class::MakeMethods::Composite::Hash for details.
newβ create and copy instancesscalarβ get and set scalar values in each instancearrayβ get and set values stored in an array referred to in each instancehashβ get and set values in a hash referred to in each instanceobjectβ access an object referred to by each instance
π
Composite::Array (Instances)
Methods for manipulating positional values in arrays. See Class::MakeMethods::Composite::Array for details.
newβ create and copy instancesscalarβ get and set scalar values in each instancearrayβ get and set values stored in an array referred to in each instancehashβ get and set values in a hash referred to in each instanceobjectβ access an object referred to by each instance
π
Composite::Global (Global)
Methods for manipulating global data. See Class::MakeMethods::Composite::Global for details.
scalarβ get and set global scalararrayβ get and set values stored in a global arrayhashβ get and set values in a global hashobjectβ global access to an object ref
π
Composite::Inheritable (Any)
Methods for manipulating data which may be overridden per class or instance. Uses external data storage, so it works with objects of any underlying data type. See Class::MakeMethods::Composite::Inheritable for details.
scalarβ get and set scalar values for each instance or classhookβ create a subroutine intended to have operations added to it
π
Composite::Universal (Any)
Methods for padding pre- and post-conditions to any class. See Class::MakeMethods::Composite::Universal for details.
patchβ add pre and post operations to an existing subroutine
β¨ TEMPLATE CLASSES β¨
π Template::Universal (Any)
Meta-methods for any type of object, periodt. See Class::MakeMethods::Template::Universal.
no_opβ a method with an empty body (it literally does nothing and honestly? same π )croakβ a method which will croak if called πmethod_initβ calls other methods from a list ofmethod name => argumentpairsforward_methodsβ delegates to an object provided by another method
π¦ Template::Ref (Any Instance)
Methods for deep copies and comparisons. See Class::MakeMethods::Template::Ref.
cloneβ make a deep copy of an object instanceprototypeβ make new objects by cloning a typical instancecompareβ compare one object to another
π Template::Generic (Abstract)
The remaining subclasses inherit a similar collection of templates from Template::Generic, and provide a different type of scoping or binding for the functionality defined by the Generic template. See Class::MakeMethods::Template::Generic for details. it's giving family tree energy π³
πΈ Template::Hash (Instances)
The most commonly used implementation, for objects based on blessed hashes. The main character of implementations, fr fr. See Class::MakeMethods::Template::Hash.
newβ create and copy instancesscalarβ get and set scalar values in each instancestringβ get and set string values in each instancenumberβ get and set numeric values in each instancebooleanβ get and set boolean values in each instancebitsβ get and set boolean values stored in a single value in each instancearrayβ get and set values stored in an array referred to in each instancestructβ methods for accessing values which are stored by position in an arrayhashβ get and set values in a hash referred to in each instancetiedhashβ get and set values in a tied hash referred to in each instancehash_of_arraysβ for references to hashes of arrays contained in each instanceobjectβ set or access a reference to an object contained in each instancearray_of_objectsβ manipulate an array of object references within in each instancecodeβ set or call a function reference contained in each instance
π Template::Array (Instances)
Methods for manipulating positional values in arrays. See Class::MakeMethods::Template::Array.
newβ create and copy array instancesscalarβ get and set scalar values in a given array positionstringβ get and set string values in a given array positionnumberβ get and set numeric values in a given array positionbooleanβ get and set boolean values in a given array positionbuiltin_isaβ generates a wrapper around some builtin function, cacheing the results in the object and providing a by-name interface
π§ Template::Scalar (Instances)
For objects based on blessed scalars. See Class::MakeMethods::Template::Scalar.
β οΈ Note that these objects can generally only have one value accessor method, as all such accessors will refer to the same value. so like... pick one bestie, that's the whole vibe π
newβ create and copy instancesscalarβ get and set scalar values in each instancestringβ get and set a string value in each instancenumberβ get and set a numeric value in each instancebooleanβ get and set a boolean value in each instancebitsβ get and set boolean values stored in a single value in each instancecodeβ set or call a function reference contained in each instance
β Template::InsideOut (Instances)
Stores values for objects in an external location hashed by identity. iconic external-storage behaviour, no cap β¨ See Class::MakeMethods::Template::InsideOut.
π‘ Note that while the below constructor creates and returns scalar references, accessor methods can be created with this implementation for use with any type of object.
newβ create and copy instancesscalarβ get and set scalar values associated with each instancestringβ get and set string values associated with each instancestring_indexβ get and set string values associated with each instance, and maintain an index of instances by valuenumberβ get and set numeric values associated with each instancebooleanβ get and set boolean values associated with each instanceboolean_indexβ get and set boolean values associated with each instance, and maintain a list of items which have the flag setbitsβ get and set boolean values stored in a single value associated with each instancearrayβ get and set values stored in an array associated with each instancehashβ get and set values in a hash associated with each instancecodeβ set or call a function reference associated with each instance
π Template::Global (Global)
Global methods are not instance-dependent; calling them by class name or from any instance will consistently access the same value. See Class::MakeMethods::Template::Static.
scalarβ get and set a global scalar valuestringβ get and set a global string valuenumberβ get and set a global number valuebooleanβ get and set a global boolean valuearrayβ get and set values in a global arrayhashβ get and set values in a global hashtiedhashβ get and set values in a global tied hashhash_of_arraysβ get and set values in a global hash of arraysobjectβ set and access a global reference to an objectinstanceβ set and access a global reference to an object of the declaring classcodeβ set and access a global reference to a subroutine.
π Template::PackageVar (Global)
PackageVar methods access a variable in the declaring package. Thus, they have the same effect as Static methods, while keeping their value accessible via the symbol table. sneaky but valid π
See Class::MakeMethods::Template::PackageVar.
scalarβ get and set a global scalar valuestringβ get and set a global string valuenumberβ get and set a global number valuebooleanβ get and set a global boolean valuearrayβ get and set values in a global arrayhashβ get and set values in a global hash
π₯ Template::Class (Global)
Class methods are similar to Static methods, except that each subclass and its instances will access a distinct value. See Class::MakeMethods::Template::Class.
scalarβ get and set a class-specific scalar valuestringβ get and set a class-specific string valuenumberβ get and set a class-specific number valuebooleanβ get and set a class-specific boolean valuearrayβ get and set values in a class-specific arrayhashβ get and set values in a class-specific hash
π Template::ClassVar (Global)
ClassVar methods access a variable in the package on which they are called. Thus, they have the same effect as Class methods, while keeping their value accessible via the symbol table, like PackageVar. See Class::MakeMethods::Template::ClassVar.
scalarβ get and set a class-specific scalar valuestringβ get and set a class-specific string valuenumberβ get and set a class-specific number valuebooleanβ get and set a class-specific boolean valuearrayβ get and set values in a class-specific arrayhashβ get and set values in a class-specific hash
π«Ά Template::ClassInherit (Global)
ClassInherit methods are an intermediate point between Static and Class methods; subclasses inherit their superclass's value until they set their own value, after which they become distinct. it's giving "borrowing your sister's clothes until you buy your own" energy π See Class::MakeMethods::Template::ClassInherit.
scalarβ get and set an inheritable class-specific scalar valuestringβ get and set an inheritable class-specific string valuenumberβ get and set an inheritable class-specific number valuebooleanβ get and set an inheritable class-specific boolean valuearrayβ get and set values in an inheritable class-specific arrayhashβ get and set values in an inheritable class-specific hash
π¦ Template::Inheritable (Any)
Methods for manipulating data which may be overridden per class or instance. Uses external data storage, so it works with objects of any underlying data type. literally universal, we love to see it π See Class::MakeMethods::Template::Inheritable for details.
scalarβ get and set scalar values for each instance or classstringβ get and set string values for each instance or classnumberβ get and set numeric values for each instance or classbooleanβ get and set boolean values for each instance or classhashβ get and set values in a hash referred to in each instance
π SEE ALSO
See Class::MakeMethods for general information about this distribution.
okay that's the whole tour bestie, go forth and make methods π β¨
This one's from perl v5.36.0, dated 2022-10-13 β vintage but still slaying π
π¦ where this page comes from
- ubuntu noble: libclass-makemethods-perl 1.01-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libclass-makemethods-perl 1.01-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libclass-makemethods-perl 1.01-7 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms