|
|
Эта страница руководства является частью версии 5.0 Инструментов XCodeПолучить эти инструменты:
Если Вы выполняете версию Инструментов XCode кроме 5,0, просматриваете документацию локально:
Читать страницы руководстваСтраницы руководства предназначаются как справочник для людей, уже понимающих технологию.
|
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)
|
Сообщение о проблемах
Способ сообщить о проблеме с этой страницей руководства зависит от типа проблемы:
- Ошибки содержания
- Ошибки отчета в содержании этой документации к проекту Perl. (См. perlbug (1) для инструкций представления.)
- Отчеты об ошибках
- Сообщите об ошибках в функциональности описанного инструмента или API к Apple через Генератор отчетов Ошибки и к проекту Perl, использующему perlbug (1).
- Форматирование проблем
- Отчет, форматирующий ошибки в интерактивной версии этих страниц со ссылками на отзыв ниже.