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
38 The following methods from Generic should be supported:
39
40 scalar
41 string
42 number
43 boolean
44 bits (?)
45 array
46 hash
47 tiedhash (?)
48 hash_of_arrays (?)
49 object
50 instance
51 array_of_objects (?)
52 code
53 code_or_scalar (?)
54
55 See Class::MakeMethods::Template::Generic for the interfaces and behav‐
56 iors of these method types.
57
58 The items marked with a ? above have not been tested sufficiently;
59 please inform the author if they do not function as you would expect.
60
62 See Class::MakeMethods for general information about this distribution.
63
64 See Class::MakeMethods::Template for more about this family of sub‐
65 classes.
66
67 See Class::MakeMethods::Template::Generic for information about the
68 various accessor interfaces subclassed herein.
69
70
71
72perl v5.8.8 2004-09-06 MakeMethods::Template::Global(3)