Class::MakeMethods::Template::Static - Method that are not instance-dependent
package MyObject; use Class::MakeMethods::Template::Static ( scalar => [ 'foo' ] ); package main; MyObject->foo('bar') print MyObject->foo();
These meta-methods access values that are shared across all instances of your object in your process. For example, a hash_scalar meta-method will be able to store a different value for each hash instance you call it on, but a static_scalar meta-method will return the same value for any instance it's called on, and setting it from any instance will change the value that all other instances see.
Common Parameters: The following parameters are defined for Static meta-methods.
The shared value.
Creates accessor methods each of which shares a single scalar value.
See the documentation on Generic:scalar for interfaces and behaviors.
Generic:scalar
Creates accessor methods, each of which shares a single array-ref value.
See the documentation on Generic:array for interfaces and behaviors.
Generic:array
Creates accessor methods, each of which shares a single hash-ref value.
See the documentation on Generic:hash for interfaces and behaviors.
Generic:hash
A variant of Template::Static:hash which initializes the hash by tieing it to a caller-specified package.
See the documentation on Generic:tiedhash for interfaces and behaviors, and for required additional parameters.
Generic:tiedhash
Creates accessor methods, each of which shares a reference to a single hash of array-refs.
See the documentation on Generic:hash_of_arrays for interfaces and behaviors.
Generic:hash_of_arrays
Creates methods which contain an subroutine reference.
See the documentation on Generic:code for interfaces, behaviors, and parameters.
Generic:code
Creates methods to handle a single instance of the calling class.
See the documentation on Generic:instance for interfaces and behaviors.
Generic:instance
Class::MakeMethods
To install Class::MakeMethods::Template, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::MakeMethods::Template
CPAN shell
perl -MCPAN -e shell install Class::MakeMethods::Template
For more information on module installation, please visit the detailed CPAN module installation guide.