9 plan skip_all => 'Test needs: ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_cycle')
10 unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_cycle') );
17 import Test::Memory::Cycle;
22 my $s = $weak->{schema} = DBICTest->init_schema;
23 memory_cycle_ok($s, 'No cycles in schema');
25 my $rs = $weak->{resultset} = $s->resultset ('Artist');
26 memory_cycle_ok($rs, 'No cycles in resultset');
28 my $rsrc = $weak->{resultsource} = $rs->result_source;
29 memory_cycle_ok($rsrc, 'No cycles in resultsource');
31 my $row = $weak->{row} = $rs->first;
32 memory_cycle_ok($row, 'No cycles in row');
34 Scalar::Util::weaken ($_) for values %$weak;
35 memory_cycle_ok($weak, 'No cycles in weak object collection');
39 ok (! $weak->{$_}, "No $_ leaks");