Think about Loose Coupling | |
PerlMonks |
Re: Local Copy of a member variableby Roy Johnson (Monsignor) |
on Oct 20, 2005 at 17:08 UTC ( [id://501738]=note: print w/replies, xml ) | Need Help?? |
You'll need a deep copy. See Data::COW. Update: Or, as holli suggests below, Scalar::Util::Clone. The former will do actual copies only of things you change; the latter will copy everything, but fast. So if it's a big structure that you're only modifying a little of, use Data::COW; if you're going to modify a substantial portion of it, use Scalar::Util::Clone.
Caution: Contents may have been coded under pressure.
In Section
Seekers of Perl Wisdom
|
|