1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
12 # make sure nothing eats the exceptions (an unchecked eval in Storage::DESTROY used to be a problem)
15 package Dying::Storage;
20 use base 'DBIx::Class::Storage::DBI';
25 my $death = $self->_dbi_connect_info->[3]{die};
27 die "storage test died: $death" if $death eq 'before_populate';
28 my $ret = $self->next::method (@_);
29 die "storage test died: $death" if $death eq 'after_populate';
35 for (qw/before_populate after_populate/) {
37 my $schema = DBICTest::Schema->clone;
38 $schema->storage_type ('Dying::Storage');
39 $schema->connection (DBICTest->_database, { die => $_ });
40 $schema->storage->ensure_connected;
41 }, qr/$_/, "$_ exception found");