[Bast-commits] r5930 - in
DBIx-Class/0.08/branches/subclassed_rsset: lib/DBIx/Class t
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Tue Apr 21 11:06:25 GMT 2009
Author: ribasushi
Date: 2009-04-21 12:06:25 +0100 (Tue, 21 Apr 2009)
New Revision: 5930
Modified:
DBIx-Class/0.08/branches/subclassed_rsset/lib/DBIx/Class/Schema.pm
DBIx-Class/0.08/branches/subclassed_rsset/t/100extra_source.t
Log:
Sloppy merge - adding imlari's fix from r5902
Modified: DBIx-Class/0.08/branches/subclassed_rsset/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/branches/subclassed_rsset/lib/DBIx/Class/Schema.pm 2009-04-21 10:57:35 UTC (rev 5929)
+++ DBIx-Class/0.08/branches/subclassed_rsset/lib/DBIx/Class/Schema.pm 2009-04-21 11:06:25 UTC (rev 5930)
@@ -1283,7 +1283,13 @@
return if ($params->{extra});
my %map = %{$self->class_mappings};
- if (exists $map{$rs_class} and $rs_class->result_source_instance ne $orig_source) {
+ if (
+ exists $map{$rs_class}
+ and
+ $map{$rs_class} ne $moniker
+ and
+ $rs_class->result_source_instance ne $orig_source
+ ) {
carp "$rs_class already has a source, use register_extra_source for additional sources";
}
$map{$rs_class} = $moniker;
Modified: DBIx-Class/0.08/branches/subclassed_rsset/t/100extra_source.t
===================================================================
--- DBIx-Class/0.08/branches/subclassed_rsset/t/100extra_source.t 2009-04-21 10:57:35 UTC (rev 5929)
+++ DBIx-Class/0.08/branches/subclassed_rsset/t/100extra_source.t 2009-04-21 11:06:25 UTC (rev 5930)
@@ -38,7 +38,7 @@
{
my $source = $schema->source('DBICTest::Artist');
$schema->register_source($source->source_name, $source);
- is($warn, '', "regregistering an existing source under the same name causes no errors");
+ is($warn, '', "re-registering an existing source under the same name causes no errors");
}
{
More information about the Bast-commits
mailing list