11 my $schema = DBICTest->init_schema;
16 $schema->resultset('CD')->create({ title => 'vacation in antarctica' })
18 qr/DBI Exception.+cd\.artist.+NULL/s
19 ); # as opposed to some other error
20 }, [], 'No warnings besides exception' );
22 my $dbh = $schema->storage->dbh;
26 $dbh->do ('INSERT INTO nonexistent_table VALUES (1)')
28 qr/DBI Exception.+no such table.+nonexistent_table/s,
29 'DBI exceptions properly handled by dbic-installed callback'
32 # This usage is a bit unusual but it was actually seen in the wild
33 # destruction of everything except the $dbh should use the proper
37 if (DBIx::Class::_ENV_::PEEPEENESS) {
38 skip "Your perl version $] appears to leak like a sieve - skipping garbage collected \$schema test", 1;
44 $dbh->do ('INSERT INTO nonexistent_table VALUES (1)')
46 qr/DBI Exception.+unhandled by DBIC.+no such table.+nonexistent_table/s,
47 'callback works after $schema is gone'