Hiroshi Sakai > HTML-Split-0.04 > HTML::Split::Pager

Download:
HTML-Split-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

HTML::Split::Pager - Pager that contains splitted HTMLs.

SYNOPSIS ^

  use HTML::Split::Pager;

  my $html = <<HTML;
  <div class="pkg">
  <h1>HTML::Split</h1>
  <p>Splitting HTML by number of characters.</p>
  </div>
  HTML;

  my $pager = HTML::Split::Pager->new(html => $html, lenght => 50);
  print $pager->text;

DESCRIPTION ^

CLASS METHODS ^

new

Create an instance of HTML::Split. Accept same arguments as split method.

INSTANCE METHODS ^

current_page

Set/Get current page.

total_pages

Return the number of total pages.

next_page

Return the next page number. If the next page doesn't exists, return undef.

prev_page

Return the previous page number. If the previous page doesn't exists, return undef.

text

Return the text of current page.

AUTHOR ^

Hiroshi Sakai <ziguzagu@cpan.org>

LICENSE ^

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: