10 my $schema = DBICTest->init_schema();
16 local $SIG{__WARN__} = sub { push @warnings, @_; };
18 # Test that this doesn't cause infinite recursion.
19 local *DBICTest::Artist::DESTROY;
20 local *DBICTest::Artist::DESTROY = sub { $_[0]->discard_changes };
22 my $artist = $schema->resultset("Artist")->create( {
24 name => "artist number 10",
27 $artist->name("Wibble");
29 print "# About to call DESTROY\n";
31 is_deeply \@warnings, [];