-
-
07 Sep 2004 21:45:34 UTC
- Distribution: Class-MakeMethods
- Module version: 1.008
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (5)
- Testers (5047 / 286 / 0)
- Kwalitee
Bus factor: 0- 69.84% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (158.37KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Class::MakeMethods::Template::Ref - Universal copy and compare methods
SYNOPSIS
package MyObject; use Class::MakeMethods::Template::Ref ( 'Hash:new' => [ 'new' ], clone => [ 'clone' ] ); package main; my $obj = MyObject->new( foo => ["Foozle", "Bozzle"] ); my $clone = $obj->clone(); print $obj->{'foo'}[1];
DESCRIPTION
The following types of methods are provided via the Class::MakeMethods interface:
clone
Produce a deep copy of an instance of almost any underlying datatype.
Parameters:
init_method
If defined, this method is called on the new object with any arguments passed in.
prototype
Create new instances by making a deep copy of a static prototypical instance.
Parameters:
init_method
If defined, this method is called on the new object with any arguments passed in.
compare
Compare one object to another.
Templates
default
Three-way (sorting-style) comparison.
equals
Are these two objects equivalent?
identity
Are these two references to the exact same object?
SEE ALSO
See Class::MakeMethods for general information about this distribution.
See Class::MakeMethods::Template for more about this family of subclasses.
See Class::MakeMethods::Utility::Ref for the clone and compare functions used above.
Module Install Instructions
To install Class::MakeMethods, copy and paste the appropriate command in to your terminal.
cpanm Class::MakeMethods
perl -MCPAN -e shell install Class::MakeMethods
For more information on module installation, please visit the detailed CPAN module installation guide.