libhtml-pager-perl-0.03.orig/ 0040755 0001750 0001750 00000000000 07075641264 015675 5 ustar jaldhar jaldhar libhtml-pager-perl-0.03.orig/Makefile.PL 0100644 0001750 0001750 00000000353 07075637705 017652 0 ustar jaldhar jaldhar use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'HTML::Pager',
'VERSION_FROM' => 'Pager.pm', # finds $VERSION
);
libhtml-pager-perl-0.03.orig/Changes 0100644 0001750 0001750 00000000743 07075641141 017163 0 ustar jaldhar jaldhar Revision history for Perl extension HTML::Pager.
0.01 Mon Aug 30 11:53:07 1999
- original version; created by h2xs 1.19
0.02
- bug fixes
- added optional named PAGER_DATA_LIST parameters
- moved persist_vars into new() options
0.03 Fri Apr 14 12:00:00 2000
- New Feature: color options for default pager template
- New Feature: javascript_presubmit option allows Pager to call
arbitrary code before submiting the form.
- bug fixes
libhtml-pager-perl-0.03.orig/test.pl 0100644 0001750 0001750 00000001220 07075637705 017206 0 ustar jaldhar jaldhar # Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl test.pl'
######################### We start with some black magic to print on failure.
# Change 1..1 below to 1..last_test_to_print .
# (It may become useful if the test is moved to ./t subdirectory.)
BEGIN { $| = 1; print "1..1\n"; }
END {print "not ok 1\n" unless $loaded;}
use HTML::Pager;
$loaded = 1;
print "ok 1\n";
######################### End of black magic.
# Insert your test code below (better if it prints "ok 13"
# (correspondingly "not ok 13") depending on the success of chunk 13
# of the test code):
libhtml-pager-perl-0.03.orig/Pager.pm 0100644 0001750 0001750 00000054036 07075640727 017301 0 ustar jaldhar jaldhar package HTML::Pager;
=head1 NAME
HTML::Pager - Perl module to handle CGI HTML paging of arbitary data
=head1 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, [ time() ]);
}
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 => ['myformvar1',
'myformvar2',
'myformvar3'],
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;
=head1 DESCRIPTION
This module 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. Take a look at
L for more info.
=cut
use strict;
use integer;
use HTML::Template;
$HTML::Pager::VERSION = '0.03';
=head1 METHODS
=head2 C
The new() method creates a new Pager object and prepares the data for
C