You can clone objects with CPAN module Storable.

use Storable (dclone); ... my $obj2 = dclone($obj1);

It should be faster since Storable is XS (though I haven't done any benchmarks so I can be wrong).

Another option is CPAN module Clone. I've never tried it myself so I can't say anything about it.


In reply to Re: Object::Clone a simple class providing a cloning method by IlyaM
in thread Object::Clone a simple class providing a cloning method by jonasbn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":