NAME Sereal::Dclone - Deep (recursive) cloning via Sereal SYNOPSIS use Sereal::Dclone 'dclone'; my $cloned = dclone $ref; DESCRIPTION Sereal::Dclone provides a "dclone" function modeled after the function from Storable, using Sereal for fast serialization. Sereal is presently known to support serializing SCALAR, ARRAY, HASH, REF, and Regexp references. Sereal will also serialize and recreate blessed objects, provided the underlying reference type is supported, or the object class provides FREEZE and THAW serialization methods ("FREEZE/THAW CALLBACK MECHANISM" in Sereal::Encoder). Be cautious with cloned objects as only the internal data structure is cloned, and the destructor will still be called when it is destroyed. FUNCTIONS Sereal::Dclone provides one function, which is exported on demand. dclone my $cloned = dclone $ref; Recursively clones a referenced data structure by serializing and then deserializing it with Sereal. Unlike Storable's dclone, the argument can be any serializable scalar, not just a reference. If an unsupported value is encountered, an exception will be thrown as it cannot be cloned. BUGS Report any issues on the public bugtracker. AUTHOR Dan Book COPYRIGHT AND LICENSE This software is Copyright (c) 2016 by Dan Book. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) SEE ALSO Storable, Sereal