| |
| Recipe 1.12: Cloning an Object |
Last Updated: Sep 8, 2003
Status: Draft
|
|
|
|
How important is this problem to you?
(Login to Vote)
5.00 Rating, 4 Votes
|
|
How acceptable is the proposed solution?
(Login to Vote)
4.00 Rating, 3 Votes
|
|
Problem:
   
You want to make a cloned copy of an existing object.
Solution:
  
Use the CLONE method, made available to every perl6 object:
print $obj.CLONE;
Issue:
Deep vs. shallow cloning.
|
|