libhtml-pager-perl-0.03.orig/0040755000175000017500000000000007075641264015675 5ustar jaldharjaldharlibhtml-pager-perl-0.03.orig/Makefile.PL0100644000175000017500000000035307075637705017652 0ustar jaldharjaldharuse 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/Changes0100644000175000017500000000074307075641141017163 0ustar jaldharjaldharRevision 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.pl0100644000175000017500000000122007075637705017206 0ustar jaldharjaldhar# 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.pm0100644000175000017500000005403607075640727017301 0ustar jaldharjaldharpackage 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. C requires several options, see above for syntax: =over 4 =item * query - this is the CGI.pm query object for this run. Pager will remove it's state-maintaining parameters from the query. They all begin with PAGER_, so just be careful not to use that prefix. =item * rows - this is the total number of rows in your dataset. This is needed to provide the next-button, prev-button and page-jump functionality. =item * page_size - the number of rows to display at one time. =item * get_data_callback - this is a callback that you provide to get the pages of data. It is passed two arguements - the offset and the number of rows in the page. You return an array ref containing array refs of row data. For you DBI-heads, this is very similar to selectall_arrayref() - so similar that for very simple cases you can just pass the result through. Example - this is a sub that returns data from an in-memory array of hash refs. my @data = ( { name => sam, age => 10 }, { name => saa, age => 11 }, { name => sad, age => 12 }, { name => sac, age => 13 }, { name => sab, age => 14 }, # ... ); my $get_data_sub = sub { my ($offset, $rows) = @_; my @return_array; for (my $x = 0; $x < $rows; $x++) { push(@return_array, [ $data[$offset + $x]{name}, $data[$offset + $x]{age} ] ); } return \@return_array; } my $pager = HTML::Pager->new(query => $query, get_data_callback => $get_data_sub, rows => 100, page_size => 10 ); You can also specify arguements to be passed to your callback function. To do this, call new like: HTML::Pager->new(query => $query, get_data_callback => [$get_data_sub, $arg, $arg], rows => 100, page_size => 10 ); If you want to use named, rather than numeric TMPL_VARs in your Pager template you can return a ref to an array of hashes rather than arrays. This array of hashes will be passed directly to HTML::Template to fill in the loop data for your paging area. =back 4 C supports several optional arguements: =over 4 =item * debug - if set to 1, debugging information is warn()'d during the program run. Defaults to 0. =item * template - this is an HTML::Template object to use instead of the auto-generated HTML::Template used in Pager output. It must define the following TMPL_LOOPs and TMPL_VARs. Here's what the default template looks like, to give you an idea of how to change it to suite your purposes:
Make sure you include all the TMPL_LOOPs and TMPL_VARs included above. If you get HTML::Template errors about trying to set bad param 'PAGER_BLAH', that probably means you didn't put the 'PAGER_BLAH' variable in your template. You can put extra state-maintaining fields in the paging form - in fact, I think that this is probably required for most real-world uses. Optionally you can use named parameters inside PAGER_DATA_LIST, and return an array of hashes to fill them in from get_data_callback. If you did that your template might look like: ... ... =item * persist_vars - Pass a ref to an array of the names of the CGI form parameters you want to store into this fuction, and they will be included in the hidden form data of the pager form. This method allows you to have hidden form variables which persist from page to page. This is useful when connecting your pager to some other function (such as a search form) which needs to keep some data around for later use. The old $pager->persist_vars() syntax still works but is deprecated. =item * column_names - should be set to an array ref containing the names of the columns - this will be used to create column headers. Without this arguement, the columns will have no headers. This option is only useful in very simple cases where all the data is actually in use as columns. Example: my $pager = HTML::Pager->new( column_names => [ 'one', 'two' ]); =item * cell_space_color - this specifies the color of the lines separating the cells. If the default template is mostly OK, except for the color scheme, this will provide a middle ground between the necessity of creating your own Pager template and suffering with bad colors. Example: my $pager = HTML::Pager->new( cell_space_color => '#222244' ); =item * cell_background_color - this specifies the background color of each data cell. If the default template is mostly OK, except for the color scheme, this will provide a middle ground between the necessity of creating your own Pager template and suffering with bad colors. Example: my $pager = HTML::Pager->new( cell_background_color => '#000000' ); =item * nav_background_color - this specifies the background color of the bottom navigation bar. If the default template is mostly OK, except for the color scheme, this will provide a middle ground between the necessity of creating your own Pager template and suffering with bad colors. Example: my $pager = HTML::Pager->new( nav_background_color => '#222244' ); =item * javascript_presubmit - this optional parameter allows you to specify a Javascript function which will be called when a user clicks on one of the Pager navigation buttons, prior to submitting the form. Only if this function returns 'true' will the form be submitted. The Pager navigation calls its 'PAGER_set_offset_and_submit()' javascript function when a user clicks the "Next", "Previous" or other page buttons. This normally precludes calling your own javascript submit functions to perform some task. Through this hook, you can perform client-side functions, such as form validation, which can modify the form or actually prevent the user from going to the next page. This is particularly useful for enabling some kind of work-flow involving form validation. Constructor Example: my $pager = HTML::Pager->new( javascript_presubmit => 'last_minute_javascript()' ); HTML Example: =back 4 =cut sub new { my $pkg = shift; my %hash; for (my $x = 0; $x <= $#_; $x += 2) { $hash{lc($_[$x])} = $_[($x + 1)]; } my $self = bless(\%hash, $pkg); # check required parameters die("Called $pkg->new() called without a query parameter.") unless exists($self->{query}); die ("Called $pkg->new() called with a query parameter that does not appear to be a valid CGI object.") unless (ref($self->{query}) eq 'CGI'); die ("Called $pkg->new() called with a persist_vars parameter that does not appear to be an array ref.") if (exists($self->{persist_vars}) and ref($self->{persist_vars}) ne 'ARRAY'); die("Called $pkg->new() called without a rows parameter.") unless exists($self->{rows}); die("Called $pkg->new() called with and invalid rows parameter.") if ($self->{rows} < 0); die("Called $pkg->new() called without a page_size parameter.") unless exists($self->{page_size}); die("Called $pkg->new() called with and invalid page_size parameter.") if ($self->{page_size} <= 0); die("Called $pkg->new() called without a get_data_callback parameter.") unless exists($self->{get_data_callback}); die ("Called $pkg->new() with a get_data_callback parameter that does not appear to be a valid subroutine reference.") if (!ref($self->{get_data_callback}) || !((ref($self->{get_data_callback}) ne 'CODE') || (ref($self->{get_data_callback}) ne 'ARRAY'))); # set default parameters $self->{debug} = 0 unless exists($self->{debug}); $self->{column_names} = undef unless exists($self->{column_names}); $self->{persist_vars} = [] unless exists($self->{persist_vars}); $self->{javascript_presubmit} = '' unless exists($self->{javascript_presubmit}); # Default colors $self->{cell_space_color} = '#000000' unless(exists($self->{cell_space_color})); $self->{cell_background_color} = '#ffffff' unless(exists($self->{cell_background_color})); $self->{nav_background_color} = '#DDDDDD' unless(exists($self->{nav_background_color})); # pull out the query data $self->_parse_query; # fills in the paging template, generating one if necessary. $self->_fill_template; return $self; } # parses out the query data needed to maintain state - just # PAGER_offset for now. sub _parse_query { my $self = shift; my $query = $self->{query}; if (defined($query->param('PAGER_offset'))) { $self->{offset} = $query->param('PAGER_offset'); } else { $self->{offset} = 0; } ($self->{debug}) && (warn("offset set to $self->{offset}")); } # fills in the template, generating the default one if necessary. sub _fill_template { my $self = shift; # get the data if (ref($self->{get_data_callback}) eq 'CODE') { my $get_data_callback = $self->{get_data_callback}; $self->{data} = &$get_data_callback ($self->{offset}, $self->{page_size}); defined($self->{data}) || (die("Pager: get_data_callback returned undef!")); } elsif (ref($self->{get_data_callback}) eq 'ARRAY') { my $get_data_callback = $self->{get_data_callback}[0]; my @args; for (my $x = 1; $x <= $#{$self->{get_data_callback}}; $x++) { push(@args, $self->{get_data_callback}[$x]); } $self->{data} = &$get_data_callback ($self->{offset}, $self->{page_size}, @args); defined($self->{data}) || (die("Pager: get_data_callback returned undef!")); } else { die "Bad format for get_data_callback - must be a code reference or an array reference (for use with extra arguements). See the documentation for details."; } ($self->{debug}) && (warn("Got data.")); # check the data for the correct format, determine if we're doing # named or positional args if (ref($self->{data}) ne 'ARRAY') { die "get_data_callback returned something that isn't an array ref! You must return from get_data_callback in the format [ [ \$col1, \$col2], [ \$col1, \$col2] ] or [ { NAME => value ... }, { NAME => value ...} ]."; } my $args_type; if (defined($self->{data}[0]) and (ref($self->{data}[0]) eq 'ARRAY')) { $args_type = 'ARRAY'; } else { $args_type = 'HASH'; } foreach my $rowRef (@{$self->{data}}) { die "get_data_callback returned something that isn't an array ref! You must return from get_data_callback in the format [ [ \$col1, \$col2], [ \$col1, \$col2] ] or [ { NAME => value ... }, { NAME => value ...} ]." unless (ref($rowRef) eq $args_type); } # create template if necessary if (!exists($self->{template})) { # calculate cols $self->{cols} = 0; foreach my $rowRef (@{$self->{data}}) { if (scalar(@{$rowRef}) > $self->{cols}) { $self->{cols} = scalar(@{$rowRef}); } } if (defined($self->{column_names})) { if (scalar(@{$self->{column_names}}) > $self->{cols}) { $self->{cols} = scalar(@{$self->{column_names}}); } } $self->_create_default_template; } my $template = $self->{template}; # fill in the template if ($args_type eq 'ARRAY') { # handle array case my @pager_list; if (defined($self->{column_names})) { my %row; my $x = 0; foreach my $col_name (@{$self->{column_names}}) { $row{"PAGER_DATA_COL_$x"} = "$col_name"; $x++; } push(@pager_list, \%row); } foreach my $rowRef (@{$self->{data}}) { my %row; my $x = 0; foreach my $value (@{$rowRef}) { $value = '' unless (defined($value)); $row{"PAGER_DATA_COL_$x"} = $value; $x++; } if ($x) { push(@pager_list, \%row); } } $template->param('PAGER_DATA_LIST', \@pager_list); } else { # handle the hash case $template->param(PAGER_DATA_LIST => $self->{data}); } # generate next and prev if (($self->{offset} + $self->{page_size}) < $self->{rows}) { my $next_offset = $self->{offset} + $self->{page_size}; $template->param('PAGER_NEXT', ""); } if ($self->{offset} > 0) { my $prev_offset = $self->{offset} - $self->{page_size}; if ($prev_offset < 0) { $prev_offset = 0; } ; $template->param('PAGER_PREV', ""); } # generate jump zone my %jump_links; my $between_pages = 0; my $this_page_number = (($self->{offset} / $self->{page_size}) + 1); if ($this_page_number =~ /\./) { $this_page_number = int($this_page_number) + 1; $between_pages = 1; } $jump_links{0} = [$self->{offset}, $this_page_number]; # forward jumps for (my $x = 1; $x <= 6; $x++) { my $offset = ($self->{offset} + ($self->{page_size} * $x)); if ($offset < $self->{rows}) { $jump_links{$x} = [$offset, ($this_page_number + $x)]; } else { last; } } # backward jumps for (my $x = 1; $x <= 6; $x++) { my $offset = ($self->{offset} - ($self->{page_size} * $x)); if ($offset >= 0) { $jump_links{"-$x"} = [$offset, ($this_page_number - $x)]; } elsif ($between_pages) { $jump_links{"-$x"} = [0, ($this_page_number - $x)]; $between_pages = 0; } else { last; } } # output the jumps my $jump_string = ""; my $did_others = 0; if (exists $jump_links{-6}) { $jump_string .= "...\n"; } for (my $x = -5; $x <= 5; $x++) { if (exists $jump_links{$x}) { if ($x != 0) { $jump_string .= "$jump_links{$x}[1]\n"; $did_others = 1; } else { $jump_string .= "$jump_links{$x}[1]\n"; } } } if (exists $jump_links{6}) { $jump_string .= "...\n"; } if ($did_others) { $template->param('PAGER_JUMP', $jump_string); } # Did the user specify a javascript_presubmit? my $javascript_presubmit = $self->{javascript_presubmit}; if ($javascript_presubmit) { $javascript_presubmit = <param('PAGER_JAVASCRIPT', < END } # dynamically generates a template for the appropriate number of # columns. sub _create_default_template { my $self = shift; my $cols = $self->{cols}; my $cell_space_color = $self->{cell_space_color}; # default: '#000000' my $cell_background_color = $self->{cell_background_color}; # default: '#ffffff' my $nav_background_color = $self->{nav_background_color}; # default: '#DDDDDD' my $template_text = <
END for (my $x = 0; $x < $cols; $x++) { $template_text .= < END } $template_text .= <
END $self->{template} = HTML::Template->new(scalarref => \$template_text); } =head2 C This method returns the HTML
and to create the paging list-view. If you used the template option to new() this will output the entire template. =cut sub output { my $self = shift; my $query = $self->{query}; my $template = $self->{template}; my @hidden = (); push(@hidden, $query->hidden('-name' =>'PAGER_offset', '-value' => $self->{offset}, '-override' => 1) ); foreach my $var (@{$self->{persist_vars}}) { push(@hidden, $query->hidden('-name' => $var)); } $template->param(PAGER_HIDDEN => join("\n", @hidden)); return $template->output(); } # deprecated equivalent to new(persist_vars => []) sub persist_vars { my $self = shift; if ((@_ == 1) and (ref($_[0]) eq 'ARRAY')) { $self->{persist_vars} = [ @{$_[0]} ]; } else { $self->{persist_vars} = [@_]; } return (@{$self->{persist_vars}}); } =head1 MAINTAINING PAGING STATE Sometimes you'll want to be able to allow the user to leave your paging list and be able to come back to where they were without requiring that they use the Back button. To do this all you have to do is arrange to save the state of the PAGER_offset parameter, and pass it back to the paging-list CGI. =head1 CREDITS This module was created for Vanguard Media and I'd like to thank my boss, Jesse Erlbaum, for allowing me to release it to the public. He also added the persist_vars functionality, the background colors option and the javascript_presubmit option. =head1 AUTHOR Sam Tregar, sam@tregar.com =head1 LICENSE HTML::Template : A Perl module to handle CGI HTML paging of arbitary data Copyright (C) 1999 Sam Tregar (sam@tregar.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA =head1 SEE ALSO L, L =cut # YEs! 1; libhtml-pager-perl-0.03.orig/LICENSE0100644000175000017500000004312707075637706016714 0ustar jaldharjaldhar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. libhtml-pager-perl-0.03.orig/README0100644000175000017500000000326507075637706016566 0ustar jaldharjaldharNAME HTML::Pager - Perl module to handle CGI HTML paging of arbitary data 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::Templateto 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 the the HTML::Template perldocs for more info. This module is licenced under the GPL. See the LICENSE section below for more details. DOCUMENTATION Please see the perldocs for documentation. It's much more up-to-date and informative than this README! LICENSE HTML::Pager : A Perl module to handle CGI HTML paging of arbitary data Copyright (C) 1999 Sam Tregar (sam@tregar.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA libhtml-pager-perl-0.03.orig/MANIFEST0100644000175000017500000000007507075637706017033 0ustar jaldharjaldharChanges MANIFEST Makefile.PL Pager.pm test.pl README LICENSE