Query: clone
OS: centos
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
Clone(3) User Contributed Perl Documentation Clone(3)NAMEClone - recursively copy Perl datatypesSYNOPSISpackage Foo; use parent 'Clone'; package main; my $original = Foo->new; $copy = $original->clone; # or use Clone qw(clone); $a = { 'foo' => 'bar', 'move' => 'zig' }; $b = [ 'alpha', 'beta', 'gamma', 'vlissides' ]; $c = Foo->new; $d = clone($a); $e = clone($b); $f = clone($c);DESCRIPTIONThis module provides a clone() method which makes recursive copies of nested hash, array, scalar and reference types, including tied variables and objects. clone() takes a scalar argument and duplicates it. To duplicate lists, arrays or hashes, pass them in by reference. e.g. my $copy = clone (@array); # or my %copy = %{ clone (\%hash) };SEE ALSOStorable's dclone() is a flexible solution for cloning variables, albeit slower for average-sized data structures. Simple and naive benchmarks show that Clone is faster for data structures with 3 or less levels, while dclone() can be faster for structures 4 or more levels deep.COPYRIGHTCopyright 2001-2012 Ray Finch. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.AUTHORRay Finch "<rdf@cpan.org>" Breno G. de Oliveira "<garu@cpan.org>" and Florian Ragwitz "<rafl@debian.org>" perform routine maintenance releases since 2012. perl v5.16.3 2012-12-09 Clone(3)
Related Man Pages |
---|
class::mop::method(3) - mojave |
class::mop::method(3) - osx |
data::clone(3pm) - debian |
hash::merge::simple(3pm) - debian |
moosex::attribute::chainedclone(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
Image copy (Clone) |
Mount a SAN LUN which contains clone copy - AIX 6.1 |
Redhat Clone |
Clone redhat to another PC |
Looking for Reccomendations to Clone RHEL 7 |