1MakeMethods::Template::UCslearssCIonnhterriibtu(t3e)d PeMralkeDMoectuhmoednst:a:tTieomnplate::ClassInherit(3)
2
3
4

NAME

6       Class::MakeMethods::Template::ClassInherit - Overridable class data
7

SYNOPSIS

9         package MyClass;
10
11         use Class::MakeMethods( 'Template::ClassInherit:scalar' => 'foo' );
12         # We now have an accessor method for an "inheritable" scalar value
13
14         package main;
15
16         MyClass->foo( 'Foozle' );   # Set a class-wide value
17         print MyClass->foo();       # Retrieve class-wide value
18         ...
19
20         package MySubClass;
21         @ISA = 'MyClass';
22
23         print MySubClass->foo();    # Intially same as superclass,
24         MySubClass->foo('Foobar');  # but overridable per subclass/
25

DESCRIPTION

27       The MakeMethods subclass provides accessor methods that search an
28       inheritance tree to find a value. This allows you to set a shared or
29       default value for a given class, and optionally override it in a sub‐
30       class.
31
32       Standard Methods
33
34       The following methods from Generic should all be supported:
35
36         scalar
37         string
38         string_index (?)
39         number
40         boolean
41         bits (?)
42         array (*)
43         hash (*)
44         tiedhash (?)
45         hash_of_arrays (?)
46         object (?)
47         instance (?)
48         array_of_objects (?)
49         code (?)
50         code_or_scalar (?)
51
52       See Class::MakeMethods::Template::Generic for the interfaces and behav‐
53       iors of these method types.
54
55       The items marked with a * above are specifically defined in this pack‐
56       age, whereas the others are formed automatically by the interaction of
57       this package's generic settings with the code templates provided by the
58       Generic superclass.
59
60       The items marked with a ? above have not been tested sufficiently;
61       please inform the author if they do not function as you would expect.
62

SEE ALSO

64       See Class::MakeMethods for general information about this distribution.
65
66       See Class::MakeMethods::Template for more about this family of sub‐
67       classes.
68
69       See Class::MakeMethods::Template::Generic for information about the
70       various accessor interfaces subclassed herein.
71
72       If you just need scalar accessors, see Class::Data::Inheritable for a
73       very elegant and efficient implementation.
74
75
76
77perl v5.8.8                       2004-09M-a0k6eMethods::Template::ClassInherit(3)
Impressum