Debian Codegraph @

cpan/CPAN-Meta-YAML/t/tml-local/dump-error/circular.tml

raw
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