1MakeMethods::Emulator(3U)ser Contributed Perl DocumentatiMoankeMethods::Emulator(3)
2
3
4

NAME

6       Class::MakeMethods::Emulator - Demonstrate class-generator equivalency
7

SYNOPSIS

9         # Equivalent to use Class::Singleton;
10         use Class::MakeMethods::Emulator::Singleton;
11
12         # Equivalent to use Class::Struct;
13         use Class::MakeMethods::Emulator::Struct;
14         struct ( ... );
15
16         # Equivalent to use Class::MethodMaker( ... );
17         use Class::MakeMethods::Emulator::MethodMaker( ... );
18
19         # Equivalent to use base 'Class::Inheritable';
20         use base 'Class::MakeMethods::Emulator::Inheritable';
21         MyClass->mk_classdata( ... );
22
23         # Equivalent to use base 'Class::AccessorFast';
24         use base 'Class::MakeMethods::Emulator::AccessorFast';
25         MyClass->mk_accessors(qw(this that whatever));
26
27         # Equivalent to use accessors( ... );
28         use Class::MakeMethods::Emulator::accessors( ... );
29
30         # Equivalent to use mcoder( ... );
31         use Class::MakeMethods::Emulator::mcoder( ... );
32

DESCRIPTION

34       In several cases, Class::MakeMethods provides functionality closely
35       equivalent to that of an existing module, and it is simple to map the
36       existing module's interface to that of Class::MakeMethods.
37
38       Class::MakeMethods::Emulator provides emulators for Class::MethodMaker,
39       Class::Accessor::Fast, Class::Data::Inheritable, Class::Singleton,
40       Class::Struct, accessors, and mcoder, each of which passes the original
41       module's test suite, usually requiring only the addition of a a single
42       line to each test, activating the emulation module.
43
44       Beyond demonstrating compatibility, these emulators also generally
45       indicate the changes needed to switch to direct use of
46       Class::MakeMethods functionality, illustrate commonalities between the
47       various modules, and serve as a source for new ideas that can be
48       integrated into Class::MakeMethods.
49

SEE ALSO

51       See Class::MakeMethods for general information about this distribution.
52
53       See Class::MakeMethods::Emulator::accessors, and accessors from CPAN.
54
55       See Class::MakeMethods::Emulator::Struct, and Class::Struct from CPAN.
56
57       See Class::MakeMethods::Emulator::AccessorFast, and
58       Class::Accessor::Fast from CPAN.
59
60       See Class::MakeMethods::Emulator::Inheritable, and
61       Class::Data::Inheritable from CPAN.
62
63       See Class::MakeMethods::Emulator::MethodMaker, and Class::MethodMaker
64       from CPAN.
65
66       See Class::MakeMethods::Emulator::Singleton, and Class::Singleton from
67       CPAN.
68
69       See Class::MakeMethods::Emulator::mcoder, and mcoder from CPAN.
70
71
72
73perl v5.32.0                      2020-07-28          MakeMethods::Emulator(3)
Impressum