From: Jess Robinson Date: Tue, 10 Feb 2009 21:41:58 +0000 (+0000) Subject: 1) Add docs to ATTRIBUTES to better explain where to use them X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc24b6cbe8dadeefd1c0a36a253ee893914562a9;p=dbsrgits%2FDBIx-Class-Historic.git 1) Add docs to ATTRIBUTES to better explain where to use them 2) Make all() die if passed arguments. --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 118496e..65b763f 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -1109,7 +1109,11 @@ is returned in list context. =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,8 +2402,12 @@ sub throw_exception { =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, L, L, +L. + +These are in no particular order: =head2 order_by @@ -2492,7 +2500,7 @@ L but adds columns to the selection. =over 4 -Indicates additional column names for those added via L. +Indicates additional column names for those added via L. See L. =back