1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
6 # without this the stacktrace of $schema will be activated
7 BEGIN { $ENV{DBIC_TRACE} = 0 }
14 use DBIx::Class::Carp;
17 sub DBICTest::DBICCarp::frobnicate {
18 DBICTest::DBICCarp::branch1();
19 DBICTest::DBICCarp::branch2();
22 sub DBICTest::DBICCarp::branch1 { carp_once 'carp1' }
23 sub DBICTest::DBICCarp::branch2 { carp_once 'carp2' }
27 DBICTest::DBICCarp::frobnicate();
31 ], 'expected warnings from carp_once';
36 package DBICTest::DBICCarp::Exempt;
37 use DBIx::Class::Carp;
39 sub _skip_namespace_frames { qr/^DBICTest::DBICCarp::Exempt/ }
43 DBICTest->init_schema(no_deploy => 1)->storage->dbh_do(sub {
44 shift->throw_exception('time to die');
70 # the __LINE__ relationship below is important - do not reformat
71 throws_ok { DBICTest::DBICCarp::Exempt::dcaller() }
72 qr/\QDBICTest::DBICCarp::Exempt::thrower(): time to die at @{[ __FILE__ ]} line @{[ __LINE__ - 1 ]}\E$/,
73 'Expected exception callsite and originator'
76 # the __LINE__ relationship below is important - do not reformat
77 warnings_like { DBICTest::DBICCarp::Exempt::wcaller() }
78 qr/\QDBICTest::DBICCarp::Exempt::warner(): time to warn at @{[ __FILE__ ]} line @{[ __LINE__ - 1 ]}\E$/,