[Bast-commits] r3951 - in
DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class: .
ResultSource/Table
edenc at dev.catalyst.perl.org
edenc at dev.catalyst.perl.org
Thu Jan 17 20:37:59 GMT 2008
Author: edenc
Date: 2008-01-17 20:37:58 +0000 (Thu, 17 Jan 2008)
New Revision: 3951
Modified:
DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/Partitioned.pm
DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Partitioned.pm
Log:
fixed issue with $schema->clone
Modified: DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/Partitioned.pm
===================================================================
--- DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/Partitioned.pm 2008-01-17 16:48:49 UTC (rev 3950)
+++ DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/Partitioned.pm 2008-01-17 20:37:58 UTC (rev 3951)
@@ -125,12 +125,11 @@
sub delete {
my $self = shift;
- $self->next::method(@_);
if ( my $part = $self->_current_partition ) {
$self->delete_partitioned;
$self->_current_partition('');
}
- return $self;
+ return $self->next::method(@_);
}
=head1 AUTHOR
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-01-17 16:48:49 UTC (rev 3950)
+++ DBIx-Class-Partitioned/1.000/trunk/lib/DBIx/Class/ResultSource/Table/Partitioned.pm 2008-01-17 20:37:58 UTC (rev 3951)
@@ -5,20 +5,21 @@
use base qw/DBIx::Class::ResultSource::Table/;
-__PACKAGE__->mk_group_accessors( 'simple' => qw/_partitions _is_registered/ );
+use Scalar::Util ();
+__PACKAGE__->mk_group_accessors( 'simple' => qw/_partitions/ );
sub schema {
my $self = shift;
my ($schema) = @_;
# ugh...
- if ( !$self->_is_registered && ref $schema ) {
+ if ( Scalar::Util::blessed($schema) ) {
foreach my $partition_source ( values %{ $self->_partitions } ) {
$schema->register_source(
$partition_source->source_name => $partition_source );
}
- $self->_is_registered(1);
}
+
return $self->next::method(@_);
}
More information about the Bast-commits
mailing list