X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FTable.pm;h=42631ded9ac97b3ceac7719394d56b4698d6ae4d;hb=f85f550e1a6edce9b939b32b604bbe85f1650d39;hp=451b0bd97c650660d914cad36d089763d21d1e81;hpb=2a21de92912f460837806a8f1d0a6f8b892609da;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Table.pm b/lib/DBIx/Class/Table.pm index 451b0bd..42631de 100644 --- a/lib/DBIx/Class/Table.pm +++ b/lib/DBIx/Class/Table.pm @@ -16,8 +16,6 @@ __PACKAGE__->mk_classdata('table_alias'); # FIXME: Doesn't actually do anything __PACKAGE__->mk_classdata('_resultset_class' => 'DBIx::Class::ResultSet'); -__PACKAGE__->mk_classdata('_page_object'); - sub iterator_class { shift->_resultset_class(@_) } =head1 NAME @@ -116,25 +114,8 @@ sub search { } $attrs->{where} = (@_ == 1 || ref $_[0] eq "HASH" ? shift: {@_}); - # for pagination, we create the resultset with no limit and slice it later - my $page = {}; - if ( $attrs->{page} ) { - map { $page->{$_} = $attrs->{$_} } qw/rows page/; - delete $attrs->{$_} for qw/rows offset page/; - } - my $rs = $class->resultset($attrs); - if ( $page->{page} ) { - my $pager = Data::Page->new( - $rs->count, - $page->{rows} || 10, - $page->{page} || 1 ); - $class->_page_object( $pager ); - return $rs->slice( $pager->skipped, - $pager->skipped + $pager->entries_per_page - 1 ); - } - return (wantarray ? $rs->all : $rs); } @@ -195,17 +176,6 @@ sub find_or_create { sub columns { return keys %{shift->_columns}; } -=item page - - $pager = $class->page; - -Returns a Data::Page object for the most recent search that was performed -using the page parameter. - -=cut - -sub page { shift->_page_object } - 1; =back