GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CLASS::MAKEMETHODS::TEMPLATE::REF (3)

.ds Aq ’

NAME

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

CONTENTS

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.

<B>TemplatesB>
o default

Three-way (sorting-style) comparison.

o equals

Are these two objects equivalent?

o 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MAKEMETHODS::TEMPLATE::REF (3) 2004-09-06

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.