Trying to dump the nested hash map with shared references, in YAML file. Perl code is here. The hash is actually made thread friendly,
use v5.18;
use YAML::XS;
use threads;
use threads::shared;
use Data::Dumper;
my $href1 = shared_clone({
anotherRef => shared_clone({})
});
$href1->{anotherRef}{test} = &share({});
print Dumper $href1;
my $path = "./test.yaml";
open TAG_YAML, '>', $path;
print TAG_YAML Dump($href1);
close TAG_YAML;
1;
and in the end, I am trying to dump out the flow, it is showing the reference as mentioned below
% ./ref-of-refs.pl ; cat test.yaml
---
anotherRef: HASH(0x21897a0)
Is there any option to dump the full hash into YAML format in test.yaml file. ?