HTML::Pager

Perl module to handle CGI HTML paging of arbitary data
Download

HTML::Pager Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sam Tregar
  • Publisher web site:
  • http://search.cpan.org/~wonko/

HTML::Pager Tags


HTML::Pager Description

Perl module to handle CGI HTML paging of arbitary data HTML::Pager is a Perl module that handles the paging of data coming from an arbitrary source and being displayed using HTML::Template and CGI.pm. It provides an interface to pages of data similar to many well-known sites, like altavista.digital.com or www.google.com.This module uses HTML::Template to do all its HTML generation. While it is possible to use this module without directly using HTML::Template, it's not very useful. Modification of the look-and-feel as well as the functionality of the resulting HTML should all be done through HTML::Template objects.SYNOPSIS use HTML::Pager; use CGI; # get CGI query object my $query = CGI->new(); # create a callback subroutine to generate the data to be paged my $get_data_sub = sub { my ($offset, $rows) = @_; my @return_array; for (my $x = 0; $x < $rows; $x++) { push(@return_array, ); } return \@return_array; } # create a Pager object my $pager = HTML::Pager->new( # required parameters query => $query, get_data_callback => $get_data_sub, rows => 100, page_size => 10, # some optional parameters persist_vars => , cell_space_color => '#000000', cell_background_color => '#ffffff', nav_background_color => '#dddddd', javascript_presubmit => 'last_minute_javascript()', debug => 1, ); # make it go - send the results to the browser. print $pager->output; Requirements: · Perl


HTML::Pager Related Software