[Cpan-forum-commit] rev 79 - in trunk: . lib/CPAN/Forum templates

svn at pti.co.il svn at pti.co.il
Fri Feb 4 10:44:28 IST 2005


Author: gabor
Date: 2005-02-04 10:44:26 +0200 (Fri, 04 Feb 2005)
New Revision: 79

Modified:
   trunk/Build.PL
   trunk/lib/CPAN/Forum/DBI.pm
   trunk/lib/CPAN/Forum/Posts.pm
   trunk/templates/about.tmpl
Log:
start including code for pager support

Modified: trunk/Build.PL
===================================================================
--- trunk/Build.PL	2005-02-04 08:38:06 UTC (rev 78)
+++ trunk/Build.PL	2005-02-04 08:44:26 UTC (rev 79)
@@ -35,6 +35,8 @@
 		'Mail::Sendmail'                        => 0,  
 		'CGI::Session::SQLite'                  => 0,
 		'Parse::RecDescent'                     => 0,
+		'Class::DBI::Plugin::AbstractCount'     => 0,
+		'Class::DBI::Plugin::Pager'             => 0,
 	},
 	build_requires => {
 		'Test::WWW::Mechanize'       => 0.02,

Modified: trunk/lib/CPAN/Forum/DBI.pm
===================================================================
--- trunk/lib/CPAN/Forum/DBI.pm	2005-02-04 08:38:06 UTC (rev 78)
+++ trunk/lib/CPAN/Forum/DBI.pm	2005-02-04 08:44:26 UTC (rev 79)
@@ -4,6 +4,9 @@
 use base 'Class::DBI';
 use Carp qw(croak);
 
+use Class::DBI::Plugin::AbstractCount;      # pager needs this
+use Class::DBI::Plugin::Pager;
+
 use DBI;
 
 sub myinit {

Modified: trunk/lib/CPAN/Forum/Posts.pm
===================================================================
--- trunk/lib/CPAN/Forum/Posts.pm	2005-02-04 08:38:06 UTC (rev 78)
+++ trunk/lib/CPAN/Forum/Posts.pm	2005-02-04 08:44:26 UTC (rev 79)
@@ -23,7 +23,19 @@
 	return $class->sth_to_objects($class->sql_latest($count));
 }
 
+sub mysearch {
+	my ($self, $params, $page, $per_page) = @_;
 
+	my %where;
+
+	my $pager = __PACKAGE__->pager(
+		where         => \%where,
+		per_page      => $per_page || 10,
+		page          => $page || 1,
+#		order_by      => $order_by,
+	);
+}
+
 1;
  
 

Modified: trunk/templates/about.tmpl
===================================================================
--- trunk/templates/about.tmpl	2005-02-04 08:38:06 UTC (rev 78)
+++ trunk/templates/about.tmpl	2005-02-04 08:44:26 UTC (rev 79)
@@ -34,6 +34,8 @@
 		<li><a href="/dist/XML-RSS-SimpleGen">XML::RSS::SimpleGen</a></li>
 		<li><a href="/dist/Mail-Sendmail">Mail::Sendmail</a></li>
 		<li><a href="/dist/Parse-RecDescent">Parse::RecDescent</a></li>
+		<li><a href="/dist/Class-DBI-Plugin-AbstractCount">Class::DBI::Plugin::AbstractCount</a></li>
+		<li><a href="/dist/Class-DBI-Plugin-Pager">Class::DBI::Plugin::Pager</a></li>
 	</ul>
 </div>
 <a name="statistics"></a>



More information about the Cpan-forum-commit mailing list