Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #859
Difficulty: Medium
AJAX is designed for two-way client-server communications.
True or False?
Linux & Unix Commands - Search Man Pages

class::dbi::pager(3pm) [debian man page]

Class::DBI::Pager(3pm)					User Contributed Perl Documentation				    Class::DBI::Pager(3pm)

Class::DBI::Pager - Pager utility for Class::DBI SYNOPSIS
package CD; use base qw(Class::DBI); __PACKAGE__->set_db(...); use Class::DBI::Pager; # just use it # then, in client code! package main; use CD; my $pager = CD->pager(20, 1); # ($items_per_page, $current_page) my @disks = $pager->retrieve_all; DESCRIPTION
Class::DBI::Pager is a plugin for Class::DBI, which glues Data::Page with Class::DBI. This module reduces your work a lot, for example when you have to do something like: * retrieve objects from a database * display objects with 20 items per page In addition, your work will be reduced more, when you use Template-Toolkit as your templating engine. See "EXAMPLE" for details. EXAMPLE
# Controller: (MVC's C) my $query = CGI->new; my $template = Template->new; my $pager = Film->pager(20, $query->param('page') || 1); my $movies = $pager->retrieve_all; $template->process($input, { movies => $movies, pager => $pager, }); # View: (MVC's V) Matched [% pager.total_entries %] items. [% WHILE (movie = %] Title: [% movie.title | html %] [% END %] ### navigation like: [1] [2] [3] [% FOREACH num = [pager.first_page .. pager.last_page] %] [% IF num == pager.current_page %][[% num %]] [% ELSE %]<a href="display?page=[% num %]">[[% num %]]</a>[% END %] [% END %] ### navigation like: prev 20 | next 20 [% IF pager.previous_page %] <a href="display?page=[% pager.previous_page %]"> prev [% pager.entries_per_page %]</a> | [% END %] [% IF pager.next_page %] <a href="display?page=[% pager.next_page %]"> next [% pager.entries_per_page %]</a> [% END %] NOTE
/ TODO This modules internally retrieves itertors, then creates "Data::Page" object for paging utility. Using SQL clauses "LIMIT" and/or "OFFSET" with "DBIx::Pager" might be more memory efficient. AUTHOR
Tatsuhiko Miyagawa <> Original idea by Tomohiro Ikebe <> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Class::DBI, Data::Page perl v5.10.0 2006-03-01 Class::DBI::Pager(3pm)

Check Out this Related Man Page

Gnome2::Wnck::Pager(3pm)				User Contributed Perl Documentation				  Gnome2::Wnck::Pager(3pm)

Gnome2::Wnck::Pager - a pager widget, showing the content of workspaces HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gnome2::Wnck::Pager INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable METHODS
widget = Gnome2::Wnck::Pager->new ($screen) o $screen (Gnome2::Wnck::Screen) $pager->set_display_mode ($mode) o $mode (Gnome2::Wnck::PagerDisplayMode) $pager->set_n_rows ($n_rows) o $n_rows (integer) boolean = $pager->set_orientation ($orientation) o $orientation (Gtk2::Orientation) $pager->set_screen ($screen) o $screen (Gnome2::Wnck::Screen) $pager->set_shadow_type ($shadow_type) o $shadow_type (Gtk2::ShadowType) $pager->set_show_all ($show_all_workspaces) o $show_all_workspaces (boolean) ENUMS AND FLAGS
enum Gnome2::Wnck::PagerDisplayMode o 'name' / 'WNCK_PAGER_DISPLAY_NAME' o 'content' / 'WNCK_PAGER_DISPLAY_CONTENT' enum Gtk2::Orientation o 'horizontal' / 'GTK_ORIENTATION_HORIZONTAL' o 'vertical' / 'GTK_ORIENTATION_VERTICAL' enum Gtk2::ShadowType o 'none' / 'GTK_SHADOW_NONE' o 'in' / 'GTK_SHADOW_IN' o 'out' / 'GTK_SHADOW_OUT' o 'etched-in' / 'GTK_SHADOW_ETCHED_IN' o 'etched-out' / 'GTK_SHADOW_ETCHED_OUT' SEE ALSO
Gnome2::Wnck, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget COPYRIGHT
Copyright (C) 2003-2006 by the gtk2-perl team. This software is licensed under the LGPL. See Gnome2::Wnck for a full notice. perl v5.14.2 2011-11-16 Gnome2::Wnck::Pager(3pm)

Featured Tech Videos