3 %bcond_without tests # do not perform "make test"
7 %include /usr/lib/rpm/macros.perl
8 Summary: List::UtilsBy - higher-order list utility functions
10 Name: perl-List-UtilsBy
14 License: GPL v1+ or Artistic
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/List/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5: df0226ccd6f8ebf8b5965e408dca8662
18 # generic URL, check or change before uncommenting
19 #URL: http://search.cpan.org/dist/List-UtilsBy/
20 BuildRequires: perl-Module-Build
21 BuildRequires: perl-devel >= 1:5.8.0
22 BuildRequires: rpm-perlprov >= 4.1-13
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 This module provides a number of list utility functions, all of which
30 take an initial code block to control their behaviour. They are
31 variations on similar core perl or List::Util functions of similar
32 names, but which use the block to control their behaviour. For
33 example, the core Perl function sort takes a list of values and
34 returns them, sorted into order by their string value. The sort_by
35 function sorts them according to the string value returned by the
36 extra function, when given each value.
38 my @names_sorted = sort @names;
40 my @people_sorted = sort_by { $_->name } @people;
42 # %description -l pl.UTF-8
46 %setup -q -n %{pdir}-%{pnam}-%{version}
50 destdir=$RPM_BUILD_ROOT \
54 %{?with_tests:./Build test}
57 rm -rf $RPM_BUILD_ROOT
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
67 %{perl_vendorlib}/List/*.pm