36
36
expected to be of the form [ $accessor, $field ].
38
38
mk_group_ro_accessors
39
__PACKAGE__->mk_group_ro_accessors(simple => 'birthdate');
39
__PACKAGE__->mk_group_ro_accessors(simple => 'birthdate', [ social_security_number => 'ssn' ]);
41
41
Arguments: $group, @fieldspec
46
46
rather than setting the value.
48
48
mk_group_wo_accessors
49
__PACKAGE__->mk_group_wo_accessors(simple => 'lie');
49
__PACKAGE__->mk_group_wo_accessors(simple => 'lie', [ subject => 'subj' ]);
51
51
Arguments: $group, @fieldspec
55
55
"mk_group_accessors" but accessors will throw an error if not passed a
56
56
value rather than getting the value.
59
__PACKAGE__->make_group_accessor(simple => 'hair_length', 'hair_length');
61
Arguments: $group, $field, $method
62
Returns: \&accessor_coderef ?
64
Called by mk_group_accessors for each entry in @fieldspec. Either
65
returns a coderef which will be installed at "&__PACKAGE__::$method", or
66
returns "undef" if it elects to install the coderef on its own.
68
make_group_ro_accessor
69
__PACKAGE__->make_group_ro_accessor(simple => 'birthdate', 'birthdate');
71
Arguments: $group, $field, $method
72
Returns: \&accessor_coderef ?
74
Called by mk_group_ro_accessors for each entry in @fieldspec. Either
75
returns a coderef which will be installed at "&__PACKAGE__::$method", or
76
returns "undef" if it elects to install the coderef on its own.
78
make_group_wo_accessor
79
__PACKAGE__->make_group_wo_accessor(simple => 'lie', 'lie');
81
Arguments: $group, $field, $method
82
Returns: \&accessor_coderef ?
84
Called by mk_group_wo_accessors for each entry in @fieldspec. Either
85
returns a coderef which will be installed at "&__PACKAGE__::$method", or
86
returns "undef" if it elects to install the coderef on its own.
148
118
$self->result_class->method();
121
These methods are documented for clarity, but are never meant to be
122
called directly, and are not really meant for overriding either.
151
125
Returns a list of 'parent' or 'super' class names that the current class
126
inherited from. This is what drives the traversal done by
130
__PACKAGE__->make_group_accessor('simple', 'hair_length', 'hair_length');
131
__PACKAGE__->make_group_accessor('simple', 'hc', 'hair_color');
133
Arguments: $group, $field, $accessor
134
Returns: \&accessor_coderef ?
136
Called by mk_group_accessors for each entry in @fieldspec. Either
137
returns a coderef which will be installed at "&__PACKAGE__::$accessor",
138
or returns "undef" if it elects to install the coderef on its own.
140
make_group_ro_accessor
141
__PACKAGE__->make_group_ro_accessor('simple', 'birthdate', 'birthdate');
142
__PACKAGE__->make_group_ro_accessor('simple', 'ssn', 'social_security_number');
144
Arguments: $group, $field, $accessor
145
Returns: \&accessor_coderef ?
147
Called by mk_group_ro_accessors for each entry in @fieldspec. Either
148
returns a coderef which will be installed at "&__PACKAGE__::$accessor",
149
or returns "undef" if it elects to install the coderef on its own.
151
make_group_wo_accessor
152
__PACKAGE__->make_group_wo_accessor('simple', 'lie', 'lie');
153
__PACKAGE__->make_group_wo_accessor('simple', 'subj', 'subject');
155
Arguments: $group, $field, $accessor
156
Returns: \&accessor_coderef ?
158
Called by mk_group_wo_accessors for each entry in @fieldspec. Either
159
returns a coderef which will be installed at "&__PACKAGE__::$accessor",
160
or returns "undef" if it elects to install the coderef on its own.
155
163
To provide total flexibility Class::Accessor::Grouped calls methods