[Bast-commits] r7294 - in DBIx-Class/0.08/trunk: . lib/DBIx/Class t
michaelr at dev.catalyst.perl.org
michaelr at dev.catalyst.perl.org
Mon Aug 10 20:40:36 GMT 2009
Author: michaelr
Date: 2009-08-10 20:40:33 +0000 (Mon, 10 Aug 2009)
New Revision: 7294
Modified:
DBIx-Class/0.08/trunk/Changes
DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
DBIx-Class/0.08/trunk/t/60core.t
Log:
Added exception when resultset called without an argument
Modified: DBIx-Class/0.08/trunk/Changes
===================================================================
--- DBIx-Class/0.08/trunk/Changes 2009-08-10 20:37:31 UTC (rev 7293)
+++ DBIx-Class/0.08/trunk/Changes 2009-08-10 20:40:33 UTC (rev 7294)
@@ -38,6 +38,7 @@
the server on every invocation unlike dbh()
- Some fixes of multi-create corner cases
- Multiple POD improvements
+ - Added exception when resultset is called without an argument
0.08108 2009-07-05 23:15:00 (UTC)
- Fixed the has_many prefetch with limit/group deficiency -
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm 2009-08-10 20:37:31 UTC (rev 7293)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Schema.pm 2009-08-10 20:40:33 UTC (rev 7294)
@@ -543,6 +543,8 @@
sub resultset {
my ($self, $moniker) = @_;
+ $self->throw_exception('resultset() expects a source name')
+ unless defined $moniker;
return $self->source($moniker)->resultset;
}
Modified: DBIx-Class/0.08/trunk/t/60core.t
===================================================================
--- DBIx-Class/0.08/trunk/t/60core.t 2009-08-10 20:37:31 UTC (rev 7293)
+++ DBIx-Class/0.08/trunk/t/60core.t 2009-08-10 20:40:33 UTC (rev 7294)
@@ -452,4 +452,6 @@
}
}
+throws_ok { $schema->resultset} qr/resultset\(\) expects a source name/, 'resultset with no argument throws exception';
+
done_testing;
More information about the Bast-commits
mailing list