Not entirely sure I understand what you need, but if the idea is to avoid cross references being created, you might want to try $Data::Dumper::Deepcopy = 1;
For the following sample structure, the difference in output would be
my $y = { foo => "bar" };
my $X = { a => $y, b => $y, c => $y };
$Data::Dumper::Deepcopy = 1;
print Dumper($X);
$VAR1 = {
'c' => {
'foo' => 'bar'
},
'a' => {
'foo' => 'bar'
},
'b' => {
'foo' => 'bar'
}
};
while the default output (Deepcopy=0) would look like
$VAR1 = {
'c' => {
'foo' => 'bar'
},
'a' => $VAR1->{'c'},
'b' => $VAR1->{'c'}
};