From: Nigel Metheringham Date: Fri, 27 Mar 2009 17:20:55 +0000 (+0000) Subject: Removed Cookbook section on pagers that stated page attribute was not required. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec30560ddfaed027767698c8ecdee25a3539eaa6;p=dbsrgits%2FDBIx-Class-Historic.git Removed Cookbook section on pagers that stated page attribute was not required. [Since the pager throws an exception if the pager attribute is not specified, this was completely wrong] --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index bd3c007..03db014 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -19,19 +19,8 @@ paged resultset, which will fetch only a defined number of records at a time: return $rs->all(); # all records for page 1 -The C attribute does not have to be specified in your search: - - my $rs = $schema->resultset('Artist')->search( - undef, - { - rows => 10, - } - ); - - return $rs->page(1); # DBIx::Class::ResultSet containing first 10 records - -In either of the above cases, you can get a L object for the -resultset (suitable for use in e.g. a template) using the C method: +You can get a L object for the resultset (suitable for use +in e.g. a template) using the C method: return $rs->pager();