[Bast-commits] r4488 - DBIx-Class/0.08/trunk/lib/DBIx/Class
castaway at dev.catalyst.perl.org
castaway at dev.catalyst.perl.org
Wed Jun 11 13:25:15 BST 2008
Author: castaway
Date: 2008-06-11 13:25:15 +0100 (Wed, 11 Jun 2008)
New Revision: 4488
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
Log:
Point at "prefetch" in the get/set cache docs
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2008-06-10 20:09:57 UTC (rev 4487)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2008-06-11 12:25:15 UTC (rev 4488)
@@ -22,8 +22,8 @@
=head1 SYNOPSIS
- my $rs = $schema->resultset('User')->search(registered => 1);
- my @rows = $schema->resultset('CD')->search(year => 2005);
+ my $rs = $schema->resultset('User')->search({ registered => 1 });
+ my @rows = $schema->resultset('CD')->search({ year => 2005 })->all();
=head1 DESCRIPTION
@@ -53,7 +53,10 @@
=head1 OVERLOADING
-If a resultset is used as a number it returns the C<count()>. However, if it is used as a boolean it is always true. So if you want to check if a result set has any results use C<if $rs != 0>. C<if $rs> will always be true.
+If a resultset is used in a numeric context it returns the L</count>.
+However, if it is used in a booleand context it is always true. So if
+you want to check if a resultset has any results use C<if $rs != 0>.
+C<if $rs> will always be true.
=head1 METHODS
@@ -1802,6 +1805,9 @@
Gets the contents of the cache for the resultset, if the cache is set.
+The cache is populated either by using the L</prefetch> attribute to
+L</search> or by calling L</set_cache>.
+
=cut
sub get_cache {
@@ -1823,6 +1829,9 @@
if the cache is set the resultset will return the cached objects rather
than re-querying the database even if the cache attr is not set.
+The contents of the cache can also be populated by using the
+L</prefetch> attribute to L</search>.
+
=cut
sub set_cache {
More information about the Bast-commits
mailing list