Deepcopy: Difference between revisions

Content added Content deleted
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
m (→‎{{header|Raku}}: Fix comments: Perl 6 --> Raku)
Line 1,622:
(formerly Perl 6)
 
Perl 6Raku doesn't currently provide a proper mechanism for deep copies, but depending on your requirements you could use one of these work-arounds:
 
<br>
Line 1,647:
'''2) Use <code>.perl.EVAL</code>:'''
 
<tt>.perl</tt> serializes the data structure to Perl 6Raku code, and <tt>.EVAL</tt> deserializes it. Limitations:
* Doesn't work correctly if the data structure contains elements that can't be properly serialized, such as closures or file handles.