Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Local Copy of a member variable

by Roy Johnson (Monsignor)
on Oct 20, 2005 at 17:08 UTC ( #501738=note: print w/replies, xml ) Need Help??

in reply to Local Copy of a member variable

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://501738]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2020-02-21 10:19 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (94 votes). Check out past polls.