[Bast-commits] r7622 - in DBIx-Class/0.08/trunk: . lib/DBIx/Class t
bluefeet at dev.catalyst.perl.org
bluefeet at dev.catalyst.perl.org
Thu Sep 10 17:03:21 GMT 2009
Author: bluefeet
Date: 2009-09-10 17:03:21 +0000 (Thu, 10 Sep 2009)
New Revision: 7622
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSetColumn.pm
DBIx-Class/0.08/trunk/t/88result_set_column.t
Log:
Fix RSC->reset() to no longer return $self, which fixes Cursor::Cached + RSC.
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2009-09-10 16:53:32 UTC (rev 7621)
+++ DBIx-Class/0.08/trunk/Changes 2009-09-10 17:03:21 UTC (rev 7622)
@@ -1,5 +1,9 @@
Revision history for DBIx::Class
+ - Change ResultSetColumn->reset() to no longer return $self, which
+ fixes an issue with using Cursor::Cached and ResultSetColumn
+ together.
+
0.08111 2009-09-06 21:58:00 (UTC)
- The hashref to connection_info now accepts a 'dbh_maker'
coderef, allowing better intergration with Catalyst
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSetColumn.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSetColumn.pm 2009-09-10 16:53:32 UTC (rev 7621)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSetColumn.pm 2009-09-10 17:03:21 UTC (rev 7622)
@@ -172,7 +172,7 @@
sub reset {
my $self = shift;
$self->_resultset->cursor->reset;
- return $self;
+ return undef;
}
=head2 first
@@ -194,7 +194,8 @@
sub first {
my $self = shift;
- my ($row) = $self->_resultset->cursor->reset->next;
+ $self->_resultset->reset();
+ my ($row) = $self->_resultset->cursor->next;
return $row;
}
Modified: DBIx-Class/0.08/trunk/t/88result_set_column.t
===================================================================
--- DBIx-Class/0.08/trunk/t/88result_set_column.t 2009-09-10 16:53:32 UTC (rev 7621)
+++ DBIx-Class/0.08/trunk/t/88result_set_column.t 2009-09-10 17:03:21 UTC (rev 7622)
@@ -8,7 +8,7 @@
my $schema = DBICTest->init_schema();
-plan tests => 20;
+plan tests => 21;
my $rs = $schema->resultset("CD")->search({}, { order_by => 'cdid' });
@@ -28,8 +28,9 @@
cmp_ok($rs_year->sum, '==', 9996, "three artists returned");
-$rs_year->reset;
+my $reset_ret = $rs_year->reset;
is($rs_year->next, 1999, "reset okay");
+is($reset_ret, undef, 'reset returns undef');
is($rs_year->first, 1999, "first okay");
More information about the Bast-commits
mailing list