Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Easy cloning leaving out selected attributes

by mzedeler (Pilgrim)
on Apr 17, 2012 at 11:31 UTC ( #965493=note: print w/replies, xml ) Need Help??


in reply to Re: Easy cloning leaving out selected attributes
in thread Easy cloning leaving out selected attributes

The point is that some (few) attributes should never be cloned, while others should. In this case, I have some objects that are stored through KioukuDB, and it never makes sense that they get the same id as the original object.

I have a role that provides default ids, so it would be nice to have the clone method default to that.

Another thing I need to differentiate is between some attributes that should be shallow clones and others that should be deep clones (using the clone() method on them, of course).

  • Comment on Re^2: Easy cloning leaving out selected attributes

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965493]
help
Chatterbox?
[stevieb]: so, it's -34c today, and some of my water pipes are frozen and one burst. sigh
[stevieb]: it doesn't seem as though "there's an app for that"
[ambrus]: burst water pipe sucks
[Corion]: ambrus: Ugh - yes, that really sucks!
[stevieb]: good thing is that both sides of the break are completely frozen, so I was able to shut off the water to the building before any water leaks. I told the landlord last year to insulate that specific area better
[Corion]: stevieb: Our SV overlords don't know what "frozen pipe" means and think it's something like "frozen yogurt"
[ambrus]: huh... what does "SV" mean there?

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2016-12-08 18:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (144 votes). Check out past polls.