One useful trick is the dclone method, freeze and thaw
a structure, resulting a deep copy. I have found this useful, but there is one gotcha. Currently I do not know of any package (
Storable and
Data::Dumper included) that can handle anonymous functions.
Therefore if you want to make a deep copy of a structure that includes anonymous subs, you will still need to roll your own. (Not that it is very hard.)