Commit | Line | Data |
---|---|---|
1f727762 | 1 | use strictures; |
ac97b4f5 | 2 | use Test::More; |
3 | ||
4 | plan skip_all => 'No Devel::Cycle' unless eval { require Devel::Cycle; 1 }; | |
1f727762 | 5 | |
6 | use Web::Simple; | |
1f727762 | 7 | |
8 | my $counter; | |
9 | my $on_cycle = sub { Devel::Cycle::_do_report( ++$counter, shift ) }; | |
10 | { | |
11 | local *STDOUT = *STDERR; | |
12 | Devel::Cycle::find_cycle( main->new->to_psgi_app, $on_cycle ); | |
13 | } | |
14 | ok !$counter, "no leak in to_psgi_app"; | |
15 | ||
16 | done_testing; |