1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
7 use DBICTest; # do not remove even though it is not used
8 use Test::More tests => 8;
12 $_[0] !~ qr/We found ResultSet class '([^']+)' for '([^']+)', but it seems that you had already set '([^']+)' to use '([^']+)' instead/ :
16 sub _chk_extra_sources_warning {
17 my $p = qr/already has a source, use register_extra_source for additional sources/;
18 defined $_[0]? $_[0] !~ /$p/ : 1;
24 [ sort DBICNSTest::RtBug41083->sources ],
26 'List of resultsource registrations',
33 local $SIG{__WARN__} = sub { $warnings .= shift };
34 package DBICNSTest::RtBug41083;
35 use base 'DBICTest::BaseSchema';
36 __PACKAGE__->load_namespaces(
37 result_namespace => 'Result_A',
38 resultset_namespace => 'ResultSet_A',
39 default_resultset_class => 'ResultSet'
44 ok(_chk_warning($warnings), 'expected no resultset complaint');
45 ok(_chk_extra_sources_warning($warnings), 'expected no extra sources complaint') or diag($warnings);
47 _verify_sources (qw/A A::Sub/);
53 local $SIG{__WARN__} = sub { $warnings .= shift };
54 package DBICNSTest::RtBug41083;
55 use base 'DBICTest::BaseSchema';
56 __PACKAGE__->load_namespaces(
57 default_resultset_class => 'ResultSet'
61 ok(_chk_warning($warnings), 'expected no resultset complaint') or diag $warnings;
62 ok(_chk_extra_sources_warning($warnings), 'expected no extra sources complaint') or diag($warnings);
64 _verify_sources (qw/A A::Sub Foo Foo::Sub/);