Clone(3) User Contributed Perl Documentation Clone(3)NAME
Clone - 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 = [ 'alpha', 'beta', 'gamma', 'vlissides' ];
$c = new Foo();
$d = clone($a);
$e = clone($b);
$f = clone($c);
DESCRIPTION
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().
AUTHOR
Ray Finch, rdf@cpan.org
Copyright 2001 Ray Finch.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO Storable(3).
perl v5.16.2 2009-01-19 Clone(3)
Check Out this Related Man Page
Clone(3) User Contributed Perl Documentation Clone(3)NAME
Clone - recursively copy Perl datatypes
SYNOPSIS
package 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);
DESCRIPTION
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 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 ALSO
Storable'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.
COPYRIGHT
Copyright 2001-2013 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.
AUTHOR
Ray 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.18.2 2013-12-07 Clone(3)
I need to move everything from an older ultra 1 onto a newer ultra 60 (OS and all) running SUNOS 5.5.1. Any suggestions on the best way to do this?
Frank
P.S. If you know of a document somewhere please let me know. (11 Replies)
could anyone give me a general idea of how i may clone a 2 Gig disk running Solaris 7 on it to another disk of the same size?
currently, this system only has one disk in it though. i do have the ability to hook up another disk via SCSI.
i have been told i need to boot to "miniroot" to run... (9 Replies)
Solaris system
version 6
I cloned the drive using the DD command.
Using the format command and examining the partitions, all looks the same as the original drive.
Problem:
When I attach the cloned drive as the master, and only drive in system, it will not boot.
Error messages:
... (9 Replies)
I've got two drives in the same Sun server and I've been cloning the boot drive to the secondary drive by using both ufsdump/ufsrestore and the dd command sucessfully.
When I try and boot the cloned drive I get the following error:
WARNING - /usr/sbin/fsck not found. Most likely the mount... (10 Replies)
Hi mates,
well before posting my problem, i really searched hi and low for some ideas, but sad to say none of them worked, including dd command.
My problem is that i have 2 harddisk, 1 in use and 1 for spare. The one im using got crashed and now im using my spare harddisk with all the... (24 Replies)
I wasn't sure where to put this thread but since i use ubuntu for data recovery, I figured this is the best place. So, a friend passed me a 250G Western Digital hard disk the other day and said that his client needs to get her pictures off it. the problem: windows says it wants to reformat the... (13 Replies)
Hi guys, I am total newbie to Linux / Ubuntu but trying it to solve the problem I have.
I have an OKI printer with bad HDD and trying to clone one from the same HDD from working printer. Board it goes on has a Fiery chipset and system used is Linux based / related - to the best of my knowlege. I... (12 Replies)
Hello Friends,
Am in requirement to clone a Live HP-UX server here's details
OS: HpUX B-11.11 with mirrored LVM disks .
S/ws: Remedy, XML engine, Annoysystem, Oracle
All Oracle, XMl and Remedy data is on SAM LUN which is used for clustering .
My requirement to create a clone server and... (10 Replies)
Hello friends,
I Working with Solaris 8 on a SunFireV890, 150 GB SCSI HD's in Raid 1 (mirroring), my problem is that the master disk failed and going to put the slave (mirror) as a Master in the slot 0 (SCSI) will not start.
The original mounting this, mirror in Raid 0:
c1t0d0s0 (master)... (10 Replies)
Hi,
First sorry for my english !
I'm a newbie on Solaris and I'm trying to clone a SUN T5220 (sun4V platform) on SUN V240 (sun4u platform) using ufsdump/ufsrestore.
Dumping all filesystem and restoring it on the V240 box and Make the disk bootable using installboot command.
When... (21 Replies)
Hi all,
Am trying to make a backup of a directory to move it to a new directory 'coz I need to do a re-install of a software.
On Linux, I can do cp -rpH but not on Solaris?
Example is as below:
ls -l dir1
total 0
-rw-r----- 1 oracle dba 0 Aug 9 13:08 fil3.txt... (9 Replies)
Hi there,
I got a pretty old HP 382 workstation, and the hdd is pretty LOUD ... ;)
So I thought I clone it to an much quiter one.
I tried this:
- removed the loud hdd
- connected it to an system running knoppix 7.0.4 (hdd is recognized with UFS filesystem; Clonezilla couldn't handle the... (9 Replies)
hello folks,
I have a 300GB ROOTVG volume groups with one filesystem /backup having 200GB allocated space
Now, I cannot alt disk clone or mirrorvg this hdisk with another smaller disk. The disk size has to be 300GB; I tried alt disk clone and mirrorvg , it doesn't work. you cannot copy LVs as... (9 Replies)
Hi,
I'm a new user of this forum and I'm not an expert of linux.
I have a broken old pc with red hat linux, I clone hdd to another pc with different mainboard and it's ok but it has only one problem, the usb ports not work.
In the boot this message appears:
... (9 Replies)