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