package Object::Clone; use strict; use vars qw($VERSION); use Data::Dumper; $VERSION = '0.02'; sub clone { my $self = shift; my $VAR1; my $copy_dump = Dumper $self; eval $copy_dump; warn $@ if $@; return $VAR1; } =pod =head1 NAME Object::Clone =head1 SYNOPSIS package Myclass; @ISA = qw(Object::Clone); my object1 = Myclass->new(attribute => 'argle'); my object2 = object1->clone; =head1 DESCRIPTION This class offers a simple cloning method. So you can make copies of your object s fast. =over =item clone The method use to clone objects. Takes no arguments, just has to be called as a regular method (cause it is) and returns a new object. =back =head1 AUTHOR jonasbn =head1 BUGS No known bugs. =head1 SEE ALSO L =head1 COPYRIGHT Copyright (c) 2001 Jonas B. Nielsen. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Drop me a mail - it will be appreciated. Home of this code is http://jonasbn.hjem.wanadoo.dk/perl =cut 1;