1Class::MethodMaker::OptUEsxetr(3C)ontributed Perl DocumeCnltaastsi:o:nMethodMaker::OptExt(3)
2
3
4
6 Class::MethodMaker::OptExt - Constants for C::MM's option extension
7 mechanism
8
10 This class is internal to Class::MethodMaker and should not be used by
11 any clients. It is not part of the public API.
12
14 This class contains the constants used by Class::MethodMaker to
15 determine the names of its methods dependent upon options invoked.
16
18 OPTEXT
19 OPTEXT is a map from options that are implemented as method extensions
20 to the option parameters.
21
22 Parameter keys are:
23
24 encode
25 code number (to allow the option combination to be encoded whilst
26 keeping the length of the subr name no more than 8 chars). encode
27 is required for all opts (for determining method extension), and
28 must be a power of two.
29
30 refer
31 Code for referring to storage (default: '$_[0]->{$name}').
32
33 decl
34 Code for declaring storage.
35
36 postac
37 Code to execute immediately after any assignment check --- for
38 example, to initialize storage if necessary
39
40 asgnchk
41 Code for checking assignments.
42
43 defchk
44 Code for default checking.
45
46 reset
47 Code to execute when resetting an element
48
49 read
50 Code to execute each time an value is read
51
52 store
53 Code to execute each time a value is stored
54
57 encode
58 Take a set of options, return a two-letter code being the extension to
59 add to the method to incorporate the extensions, and a list (arrayref)
60 of the extensions represented.
61
62 SYNOPSIS
63 my ($ext, $opt) =
64 Class::MethodMaker::OptExt->encode([qw( static type foobar )]);
65
66 ARGUMENTS
67 options
68 The options to encode, as an arrayref of option names
69
70 RETURNS
71 ext A code (string) to append to a methodname to represent the
72 options used.
73
74 opts
75 The options represented by the ext . This is generally a
76 subset of the of those provided in options, for not all general
77 options are handled by an encoded methodname.
78
87 Email the development mailing list
88 "class-mmaker-devel@lists.sourceforge.net".
89
91 Martyn J. Pearce
92
94 Copyright (c) 2003 Martyn J. Pearce. This program is free software;
95 you can redistribute it and/or modify it under the same terms as Perl
96 itself.
97
99perl v5.34.0 2022-01-21 Class::MethodMaker::OptExt(3)