[Bast-commits] r5449 - DBIx-Class/0.08/trunk/lib/DBIx/Class
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Wed Feb 11 10:37:37 GMT 2009
Author: ribasushi
Date: 2009-02-11 10:37:36 +0000 (Wed, 11 Feb 2009)
New Revision: 5449
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
Log:
make single() die if passed attributes
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-02-11 09:17:55 UTC (rev 5448)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-02-11 10:37:36 UTC (rev 5449)
@@ -607,6 +607,10 @@
sub single {
my ($self, $where) = @_;
+ if(@_ > 2) {
+ $self->throw_exception('single() only takes search conditions, no attributes. You want ->search( $cond, $attrs )->single()');
+ }
+
my $attrs = { %{$self->_resolved_attrs} };
if ($where) {
if (defined $attrs->{where}) {
More information about the Bast-commits
mailing list