The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WWW::Ruler::Piece - a piece from "cut_off" in WWW::Ruler work. An instances of this object are returned from "cut_off" in WWW::Ruler.

METHODS

ruler

Returns an array of ruler items. Every item of array is hashref with keys:

type

Here string name of type of ruler item:

prev_pointer

Symbol of button [ < ] for example. An accompanying key is "page_number"

page

The button of page number. An accompanying keys are "page_number" and key "current_page"

next_pointer

Symbol of button [ > ] for example. An accompanying key is "page_number"

ellipsis

The symbol ... in ruler. It doesn't have any accompanying keys.

page_number

The digital number of page (starts from 1) for this item ruler.

current_page

If this key exists its value is true. This key exists only for current page.

start

A start index of array (a base is zero) for cutting. This number can be used as left value of range operator ..

end

A end index of array (a base is zero) for cutting. This number can be used as right value of range operator ..

size

A size of current page. It shows how many items in current page.

outside

If a piece is located outside of array then returns true else false. It can happen when page_number is <= 0 or page_number is more than a maximal possible page number for this data array. If "outside" returned a true then "start", "end" and "size" methods will return 0 and "ruler" returns an empty array.

AUTHOR

This module has been written by Perlover <perlover@perlover.com>

LICENSE

This module is free software and is published under the same terms as Perl itself.