$self->source_registrations(\%reg);
return if ($params->{extra});
+ return unless defined($rs_class) && $rs_class->can('result_source_instance');
my %map = %{$self->class_mappings};
if (
--- /dev/null
+use strict;
+use warnings;
+
+use Test::Exception tests => 1;
+use lib qw(t/lib);
+use DBICTest;
+use DBICTest::Schema;
+use DBIx::Class::ResultSource::Table;
+
+my $schema = DBICTest->init_schema();
+
+my $foo = DBIx::Class::ResultSource::Table->new({ name => "foo" });
+my $bar = DBIx::Class::ResultSource::Table->new({ name => "bar" });
+
+lives_ok {
+ $schema->register_source(foo => $foo);
+ $schema->register_source(bar => $bar);
+} 'multiple classless sources can be registered';