[Bast-commits] r4339 - DBIx-Class/0.08/trunk/lib/DBIx/Class

dwc at dev.catalyst.perl.org dwc at dev.catalyst.perl.org
Mon May 5 23:21:36 BST 2008


Author: dwc
Date: 2008-05-05 23:21:36 +0100 (Mon, 05 May 2008)
New Revision: 4339

Modified:
   DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
Log:
Note that single expects a single row in the ResultSet docs

Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm	2008-05-05 21:41:48 UTC (rev 4338)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm	2008-05-05 22:21:36 UTC (rev 4339)
@@ -571,10 +571,18 @@
 Inflates the first result without creating a cursor if the resultset has
 any records in it; if not returns nothing. Used by L</find> as an optimisation.
 
-Can optionally take an additional condition *only* - this is a fast-code-path
-method; if you need to add extra joins or similar call ->search and then
-->single without a condition on the $rs returned from that.
+Can optionally take an additional condition B<only> - this is a fast-code-path
+method; if you need to add extra joins or similar call L</search> and then
+L</single> without a condition on the L<DBIx::Class::ResultSet> returned from
+that.
 
+B<Note>: As of 0.08100, this method assumes that the query returns only one
+row. If more than one row is returned, you will receive a warning:
+
+  Query returned more than one row
+
+In this case, you should be using L</first> or L</find> instead.
+
 =cut
 
 sub single {




More information about the Bast-commits mailing list