laziness, impatience, and hubris | |
PerlMonks |
Cloning Graph::Directed Objectsby arunhorne (Pilgrim) |
on Jul 24, 2002 at 09:08 UTC ( [id://184738]=perlquestion: print w/replies, xml ) | Need Help?? |
arunhorne has asked for the wisdom of the Perl Monks concerning the following question: Monks, I have created a Graph::Directed object. I want to make a copy of it to work on whilst keeping the original graph intact (allowing me to easily revert to the original graph). I want to clone the object. However when I do the following: $TMPGRAPH = $GRAPH it is unsurprisingly the case that operating on TMPGRAPH alters GRAPH. How can I clone $GRAPH such that modifying TMPGRAPH will not affect $GRAPH? Thanks, ____________Arun
Back to
Seekers of Perl Wisdom
|
|