Skip to content

Method deep_copy

marufcetin edited this page Sep 1, 2026 · 1 revision

Method: deep_copy()

Turkce Dokumantasyon | English Documentation

Category: Helper Methods
Submodule: AmberDB::Array
Entry Type: Deep Cloning


1. Definition and Overview

deep_copy() recursively clones nested Perl data structures (hashes, arrays, scalar references) to produce an independent deep copy without external dependencies.


2. Syntax and Signature

my $cloned_ref = $adb->deep_copy($data_structure);

3. Practical Code Example

my $original = { product => { name => "Laptop", tags => [ "Tech", "Work" ] } };
my $clone = $adb->deep_copy($original);
$clone->{product}{tags}[0] = "Gaming"; # Does not alter $original

4. See Also

AmberDB Encyclopedia

Home · A-Z Index


Getting Started & Guides


Core Concepts


Core CRUD Methods


Query, Search & Facets


Transactions & Locks


Cache, Buffer & Low-Level


Locale & Helpers


Maintenance & Tools


Configuration Flags


File Formats


Language

Clone this wiki locally