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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |