[Bast-commits] r4727 -
DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/ResultSource/Table
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Sun Aug 3 14:01:26 BST 2008
Author: lukes
Date: 2008-08-03 14:01:26 +0100 (Sun, 03 Aug 2008)
New Revision: 4727
Modified:
DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Partitioned.pm
Log:
added register_extra_source check
Modified: DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Partitioned.pm
===================================================================
--- DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Partitioned.pm 2008-08-02 13:36:52 UTC (rev 4726)
+++ DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Partitioned.pm 2008-08-03 13:01:26 UTC (rev 4727)
@@ -28,7 +28,11 @@
for $new_source->relationships;
my $new_source_name =
$self->source_name . '->partition(' . $partition . ')';
- $schema->register_source( $new_source_name => $new_source );
+ if ($schema->can('register_extra_source')) {
+ $schema->register_extra_source( $new_source_name => $new_source );
+ } else {
+ $schema->register_source( $new_source_name => $new_source );
+ }
}
}
More information about the Bast-commits
mailing list