bennymack has asked for the wisdom of the Perl Monks concerning the following question:
Hello all,
I've recently discovered that if I make an array readonly with Readonly::Array and then make a deep copy of it with Storable::dclone, the readonlyness is maintained in the deep copy.
I would like the copy not to be readonly, however. And I'm not too keen on unlocking the array in the off chance that it wasn't cloned first. Is there a better way to copy the array perhaps? From what I've seen, using Data::Dumper and eval is about half as fast as dclone and seems hackish.
Thanks in advance!
-bmb
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Storable::dclone maintains Readonly's readonlyness
by gellyfish (Monsignor) on Aug 04, 2006 at 14:28 UTC | |
|
Re: Storable::dclone maintains Readonly's readonlyness
by diotalevi (Canon) on Aug 04, 2006 at 15:57 UTC |