1MakeMethods::Template::UGsleorbaClo(n3t)ributed Perl DocMuamkeenMteatthioodns::Template::Global(3)
2
3
4
6 Class::MakeMethods::Template::Global - Method that are not
7 instance-dependent
8
10 package MyObject;
11 use Class::MakeMethods::Template::Global (
12 scalar => [ 'foo' ]
13 );
14
15 package main;
16
17 MyObject->foo('bar')
18 print MyObject->foo();
19 ...
20 print $my_instance->foo(); # same thing
21
23 These meta-methods access values that are shared across all instances
24 of your object in your process. For example, a hash_scalar meta-method
25 will be able to store a different value for each hash instance you call
26 it on, but a static_scalar meta-method will return the same value for
27 any instance it's called on, and setting it from any instance will
28 change the value that all other instances see.
29
30 Common Parameters: The following parameters are defined for Static
31 meta-methods.
32
33 data
34 The shared value.
35
36 Standard Methods
37 The following methods from Generic should be supported:
38
39 scalar
40 string
41 number
42 boolean
43 bits (?)
44 array
45 hash
46 tiedhash (?)
47 hash_of_arrays (?)
48 object
49 instance
50 array_of_objects (?)
51 code
52 code_or_scalar (?)
53
54 See Class::MakeMethods::Template::Generic for the interfaces and
55 behaviors of these method types.
56
57 The items marked with a ? above have not been tested sufficiently;
58 please inform the author if they do not function as you would expect.
59
61 See Class::MakeMethods for general information about this distribution.
62
63 See Class::MakeMethods::Template for more about this family of
64 subclasses.
65
66 See Class::MakeMethods::Template::Generic for information about the
67 various accessor interfaces subclassed herein.
68
69
70
71perl v5.32.0 2020-07-28 MakeMethods::Template::Global(3)