1MakeMethods::Template::URseefr(3C)ontributed Perl DocumeMnatkaetMieotnhods::Template::Ref(3)
2
3
4

NAME

6       Class::MakeMethods::Template::Ref - Universal copy and compare methods
7

SYNOPSIS

9         package MyObject;
10         use Class::MakeMethods::Template::Ref (
11           'Hash:new'      => [ 'new' ],
12           clone           => [ 'clone' ]
13         );
14
15         package main;
16
17         my $obj = MyObject->new( foo => ["Foozle", "Bozzle"] );
18         my $clone = $obj->clone();
19         print $obj->{'foo'}[1];
20

DESCRIPTION

22       The following types of methods are provided via the Class::MakeMethods
23       interface:
24
25   clone
26       Produce a deep copy of an instance of almost any underlying datatype.
27
28       Parameters:
29
30       init_method
31
32       If defined, this method is called on the new object with any arguments
33       passed in.
34
35   prototype
36       Create new instances by making a deep copy of a static prototypical
37       instance.
38
39       Parameters:
40
41       init_method
42
43       If defined, this method is called on the new object with any arguments
44       passed in.
45
46   compare
47       Compare one object to another.
48
49       Templates
50
51       ·   default
52
53           Three-way (sorting-style) comparison.
54
55       ·   equals
56
57           Are these two objects equivalent?
58
59       ·   identity
60
61           Are these two references to the exact same object?
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
67       subclasses.
68
69       See Class::MakeMethods::Utility::Ref for the clone and compare
70       functions used above.
71
72
73
74perl v5.28.0                      2003-09-06     MakeMethods::Template::Ref(3)
Impressum