Data-Page-Viewport
view release on metacpan or search on metacpan
lib/Data/Page/Viewport.pm view on Meta::CPAN
(
data_size => $#data, # 0 .. $#data.
page_size => $page_size, # 1 .. N.
);
my(@bound) = $page -> offset(- 1) -> bounds();
the call to C<sub offset(- 1)> will have no effect.
That is, when trying to go back past the beginning of the data set, the
bounds will be locked to values within 0 .. data_size.
Similarly, a call which would go beyond the other end of the data set,
will lock the bounds to the same range.
In short, you can't fall off the edge by calling C<sub offset()>.
This in turn means that the values returned by C<sub bounds()> will
always be valid indexes within the range 0 .. data_size.
The module implements this by building 2 objects of type Set::Window,
( run in 0.792 second using v1.01-cache-2.11-cpan-49f99fa48dc )