Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 92865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:15:16+00:00 2026-05-10T23:15:16+00:00

Given a data structure (e.g. a hash of hashes), what’s the clean/recommended way to

  • 0

Given a data structure (e.g. a hash of hashes), what’s the clean/recommended way to make a deep copy for immediate use? Assume reasonable cases, where the data’s not particularly large, no complicated cycles exist, and readability/maintainability/etc. are more important than speed at all costs.

I know that I can use Storable, Clone, Clone::More, Clone::Fast, Data::Dumper, etc. What’s the current best practice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:15:16+00:00Added an answer on May 10, 2026 at 11:15 pm

    Clone is much faster than Storable::dclone, but the latter supports more data types.

    Clone::Fast and Clone::More are pretty much equivalent if memory serves me right, but less feature complete than even Clone, and Scalar::Util::Clone supports even less but IIRC is the fastest of them all for some structures.

    With respect to readability these should all work the same, they are virtually interchangeable.

    If you have no specific performance needs I would just use Storable’s dclone.

    I wouldn’t use Data::Dumper for this simply because it’s so cumbersome and roundabout. It’s probably going to be very slow too.

    For what it’s worth, if you ever want customizable cloning then Data::Visitor provides hooking capabilities and fairly feature complete deep cloning is the default behavior.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an odd linq subquery issue. Given the following data structure: Parents Children
Given an arbitrarily nested data structure, how can I create a new data structure
I have a data structure which is as given below: class File { public
We've been given a task to write a dynamic data structure in C. I'm
Given the following tree structure in Haskell: data Tree = Leaf Int | Node
I am currently in the thinking process of the data structure I might use
If I notice that a hash table (or any other data structure built on
Given the data structure { Collection elements; String LocationName; } And a ComboBox that
Given the following JavaScript data structure - how would you describe it? BLA =
So, given that I have some type of data structure like this within a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.