1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
11 my $schema = DBICTest->init_schema;
14 $schema->txn_do (sub { die 'lol' } );
15 }, 'DBIx::Class::Exception', 'a DBIC::Exception object thrown');
18 $schema->txn_do (sub { die [qw/lol wut/] });
19 }, qr/ARRAY\(0x/, 'An arrayref thrown');
24 'Exception-arrayref contents preserved',
28 DBICTest::AntiPattern::TrueZeroLen
29 DBICTest::AntiPattern::NullObject
35 $schema->txn_do (sub { die $ap->new });
39 } qr/\QObjects of external exception class '$ap' stringify to '' (the empty string)/,
40 'Proper warning on encountered antipattern';
44 $schema->txn_do (sub { 1 });
47 $schema->txn_scope_guard->commit;
48 } [], 'No spurious PSA warnings on pre-existing antipatterns in $@';