Commit | Line | Data |
d3aaaf5e |
1 | use strict; |
2 | use warnings FATAL => 'all'; |
3 | |
4 | use Test::More; |
5 | use Test::Exception; |
6 | use t::common qw( new_dbm ); |
7 | |
8 | use_ok( 'DBM::Deep' ); |
9 | |
10 | my $dbm_factory = new_dbm(); |
11 | while ( my $dbm_maker = $dbm_factory->() ) { |
12 | my $db = $dbm_maker->(); |
13 | |
14 | my $h = {}; |
15 | my $tmp = $h; |
bb1daf85 |
16 | for (1..99) { # 98 is ok, 99 is bad. |
d3aaaf5e |
17 | %$tmp = ("" => {}); |
18 | $tmp = $tmp->{""}; |
19 | } |
20 | lives_ok { |
21 | $db->{""} = $h; |
22 | } 'deep recursion causes no errors'; |
23 | } |
24 | |
25 | done_testing; |