So it sounds like dump+eval does not create a true copy of the data structure.
None that I am aware of will retain knowledge that one scalar in the structure is a reference to another scalar in that same structure.
Ie. If you have this structure (which is different to what you showed, but may be what you intended):
$a = 'one'; $b = 'two'; @d = ( $a, $b, \$b );;
Then neither Storable:
use Storable qw[ freeze thaw ];; $x = freeze \@d;; $y = thaw $x;; pp $y;; ["one", "two", \"two"] ${ $y->[2] } = 'three';; pp $y;; ["one", "two", \"three"]
Nor Clone successfully capture that scalar reference relationship:
use Clone qw[ clone ];; $x = clone \@d;; pp $x;; ["one", "two", \"two"] ${ $x->[2] } = 'three';; pp $x;; ["one", "two", \"three"]
You could say that was a bug -- and I'd probably agree with you -- but it is a long standing one that it would appear that no one has till now seen as a problem. Which is another way of saying it is unlikely to be fixed -- or even accepted as a bug -- any time soon.
In reply to Re^10: Executing functions from another process
by BrowserUk
in thread Executing functions from another process
by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |