[Bast-commits] r5444 - DBIx-Class/0.08/trunk/lib/DBIx/Class
castaway at dev.catalyst.perl.org
castaway at dev.catalyst.perl.org
Tue Feb 10 21:41:58 GMT 2009
Author: castaway
Date: 2009-02-10 21:41:58 +0000 (Tue, 10 Feb 2009)
New Revision: 5444
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
Log:
1) Add docs to ATTRIBUTES to better explain where to use them
2) Make all() die if passed arguments.
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-02-10 20:23:27 UTC (rev 5443)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/ResultSet.pm 2009-02-10 21:41:58 UTC (rev 5444)
@@ -1109,7 +1109,11 @@
=cut
sub all {
- my ($self) = @_;
+ my $self = shift;
+ if(@_) {
+ $self->throw_exception("all() doesn't take any arguments, you probably wanted ->search(...)->all()");
+ }
+
return @{ $self->get_cache } if $self->get_cache;
my @obj;
@@ -2398,9 +2402,13 @@
=head1 ATTRIBUTES
-The resultset takes various attributes that modify its behavior. Here's an
-overview of them:
+Attributes are used to refine a ResultSet in various ways when
+searching for data. They can be passed to any method which takes an
+C<\%attrs> argument. See L</search>, L</search_rs>, L</find>,
+L</count>.
+These are in no particular order:
+
=head2 order_by
=over 4
@@ -2492,7 +2500,7 @@
=over 4
-Indicates additional column names for those added via L</+select>.
+Indicates additional column names for those added via L</+select>. See L</as>.
=back
More information about the Bast-commits
mailing list