Clone

Clone is a Perl module that can recursively copy Perl datatypes.
Download

Clone Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ray Finch
  • Publisher web site:
  • http://search.cpan.org/~rdf/Clone-0.23/Clone.pm

Clone Tags


Clone Description

Clone is a Perl module that can recursively copy Perl datatypes. Clone is a Perl module that can recursively copy Perl datatypes.SYNOPSIS use Clone; push @Foo::ISA, 'Clone'; $a = new Foo; $b = $a->clone(); # or use Clone qw(clone); $a = { 'foo' => 'bar', 'move' => 'zig' }; $b = ; $c = new Foo(); $d = clone($a); $e = clone($b); $f = clone($c);This 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 an optional parameter that can be used to limit the depth of the copy. To duplicate lists, arrays or hashes, pass them in by reference. e.g. my $copy = clone (@array); # or my %copy = %{ clone (%hash) };For a slower, but more flexible solution see Storable's dclone(). Requirements: · Perl


Clone Related Software