xref: /openbsd-src/gnu/usr.bin/perl/cpan/CPAN-Meta-YAML/t/tml-local/dump-error/circular.tml (revision 6fb12b7054efc6b436584db6cef9c2f85c0d7e27)
1=== Circular Reference Protection
2# When we try to serialize, it should NOT infinite loop
3--- perl
4$VAR1 = [
5          {
6            'a' => 'b',
7            'c' => [
8                     {},
9                     2
10                   ]
11          },
12          []
13        ];
14$VAR1->[0]{'c'}[0] = $VAR1->[0];
15$VAR1->[1] = $VAR1->[0]{'c'};
16[ $VAR1 ]
17
18--- error: E_CIRCULAR
19