MakeMe...atalog(3pm)

πŸ“¦
version 1.01 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸŽ€ 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 subclass
  • ClassVar β€” for class data shared by all instances but different for each subclass
  • ClassInherit β€” for class data shared by all instances but different for each subclass
  • Global β€” for global data shared by a class and all its instances and subclasses
  • PackageVar β€” for global data shared by a class and all its instances and subclasses
  • Universal β€” (no description given in the original, she's mysterious 🫢)
ngl the source has a lil artifact right after Universal β€” 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 instances
  • scalar β€” get and set scalar values in each instance
  • array β€” get and set values stored in an array referred to in each instance
  • hash β€” 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 instances
  • scalar β€” get and set scalar values in each instance
  • array β€” get and set values stored in an array referred to in each instance
  • hash β€” 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 value
  • array β€” get and set values in a global array
  • hash β€” 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 instances
  • scalar β€” get and set scalar values in each instance
  • array β€” get and set values stored in an array referred to in each instance
  • hash β€” get and set values in a hash referred to in each instance
  • object β€” 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 instances
  • scalar β€” get and set scalar values in each instance
  • array β€” get and set values stored in an array referred to in each instance
  • hash β€” get and set values in a hash referred to in each instance
  • object β€” 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 scalar
  • array β€” get and set values stored in a global array
  • hash β€” get and set values in a global hash
  • object β€” 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 instances
  • scalar β€” get and set scalar values in each instance
  • array β€” get and set values stored in an array referred to in each instance
  • hash β€” get and set values in a hash referred to in each instance
  • object β€” 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 instances
  • scalar β€” get and set scalar values in each instance
  • array β€” get and set values stored in an array referred to in each instance
  • hash β€” get and set values in a hash referred to in each instance
  • object β€” 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 scalar
  • array β€” get and set values stored in a global array
  • hash β€” get and set values in a global hash
  • object β€” 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 class
  • hook β€” 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 of method name => argument pairs
  • forward_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 instance
  • prototype β€” make new objects by cloning a typical instance
  • compare β€” 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 instances
  • scalar β€” get and set scalar values in each instance
  • string β€” get and set string values in each instance
  • number β€” get and set numeric values in each instance
  • boolean β€” get and set boolean values in each instance
  • bits β€” get and set boolean values stored in a single value in each instance
  • array β€” get and set values stored in an array referred to in each instance
  • struct β€” methods for accessing values which are stored by position in an array
  • hash β€” get and set values in a hash referred to in each instance
  • tiedhash β€” get and set values in a tied hash referred to in each instance
  • hash_of_arrays β€” for references to hashes of arrays contained in each instance
  • object β€” set or access a reference to an object contained in each instance
  • array_of_objects β€” manipulate an array of object references within in each instance
  • code β€” 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 instances
  • scalar β€” get and set scalar values in a given array position
  • string β€” get and set string values in a given array position
  • number β€” get and set numeric values in a given array position
  • boolean β€” get and set boolean values in a given array position
  • builtin_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 instances
  • scalar β€” get and set scalar values in each instance
  • string β€” get and set a string value in each instance
  • number β€” get and set a numeric value in each instance
  • boolean β€” get and set a boolean value in each instance
  • bits β€” get and set boolean values stored in a single value in each instance
  • code β€” 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 instances
  • scalar β€” get and set scalar values associated with each instance
  • string β€” get and set string values associated with each instance
  • string_index β€” get and set string values associated with each instance, and maintain an index of instances by value
  • number β€” get and set numeric values associated with each instance
  • boolean β€” get and set boolean values associated with each instance
  • boolean_index β€” get and set boolean values associated with each instance, and maintain a list of items which have the flag set
  • bits β€” get and set boolean values stored in a single value associated with each instance
  • array β€” get and set values stored in an array associated with each instance
  • hash β€” get and set values in a hash associated with each instance
  • code β€” 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 value
  • string β€” get and set a global string value
  • number β€” get and set a global number value
  • boolean β€” get and set a global boolean value
  • array β€” get and set values in a global array
  • hash β€” get and set values in a global hash
  • tiedhash β€” get and set values in a global tied hash
  • hash_of_arrays β€” get and set values in a global hash of arrays
  • object β€” set and access a global reference to an object
  • instance β€” set and access a global reference to an object of the declaring class
  • code β€” 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 value
  • string β€” get and set a global string value
  • number β€” get and set a global number value
  • boolean β€” get and set a global boolean value
  • array β€” get and set values in a global array
  • hash β€” 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 value
  • string β€” get and set a class-specific string value
  • number β€” get and set a class-specific number value
  • boolean β€” get and set a class-specific boolean value
  • array β€” get and set values in a class-specific array
  • hash β€” 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 value
  • string β€” get and set a class-specific string value
  • number β€” get and set a class-specific number value
  • boolean β€” get and set a class-specific boolean value
  • array β€” get and set values in a class-specific array
  • hash β€” 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 value
  • string β€” get and set an inheritable class-specific string value
  • number β€” get and set an inheritable class-specific number value
  • boolean β€” get and set an inheritable class-specific boolean value
  • array β€” get and set values in an inheritable class-specific array
  • hash β€” 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 class
  • string β€” get and set string values for each instance or class
  • number β€” get and set numeric values for each instance or class
  • boolean β€” get and set boolean values for each instance or class
  • hash β€” 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