3 %bcond_without tests # do not perform "make test"
7 Summary: Data::Page - help when paging through sets of results
8 Summary(pl.UTF-8): Data::Page - pomoc przy stronicowaniu zbiorów wyników
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: bd1fb9f7d69bf804132201c3e6a1c80a
17 URL: http://search.cpan.org/dist/Data-Page/
18 BuildRequires: perl-Module-Build
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
22 BuildRequires: perl-Class-Accessor-Chained
23 BuildRequires: perl-Test-Exception
25 Requires: perl-Class-Accessor-Chained
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 When searching through large amounts of data, it is often the case
31 that a result set is returned that is larger than we want to display
32 on one page. This results in wanting to page through various pages of
33 data. The maths behind this is unfortunately fiddly, hence this
36 The main concept is that you pass in the number of total entries, the
37 number of entries per page, and the current page number. You can then
38 call methods to find out how many pages of information there are, and
39 what number the first and last entries on the current page really are.
41 %description -l pl.UTF-8
42 Przy przeszukiwaniu dużych ilości danych zwykle zwracany zbiór wyników
43 jest większy niż chcielibyśmy wyświetlić na jednej stronie. Powoduje
44 to chęć podzielenia danych na strony. Obliczenia przy tym są niestety
45 nietrywialne i stąd ten moduł.
47 Główną ideą jest to, że przekazuje się liczbę wszystkich elementów,
48 liczbę elementów na stronie i aktualny numer strony. Można wtedy
49 wywoływać metody, aby określić liczbę stron z informacjami oraz numer
50 pierwszego i ostatniego elementu na aktualnej stronie.
53 %setup -q -n %{pdir}-%{pnam}-%{version}
56 %{__perl} Makefile.PL \
60 %{?with_tests:%{__make} test}
63 rm -rf $RPM_BUILD_ROOT
66 DESTDIR=$RPM_BUILD_ROOT
69 rm -rf $RPM_BUILD_ROOT
72 %defattr(644,root,root,755)
74 %{perl_vendorlib}/Data/Page.pm