3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
8 Summary: Regexp::Tr - run-time-compiled tr/// objects
9 Summary(pl.UTF-8): Regexp::Tr - obiekty tr/// kompilowane w czasie wykonywania
14 License: GPL v1+ or Artistic
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5: 1c01cb427ae8cfeba5d92fb392336510
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 One very useful ability of Perl is to do relatively cheap
25 transliteration via the tr/// regex operator. Unfortunately, Perl
26 requires tr/// to be known at compile-time. The common solution has
27 been to put an eval around any dynamic tr/// operations, but that is
28 very expensive to be used often (for instance, within a loop). This
29 module solves that problem by compiling the tr/// a single time and
30 allowing the user to use it repeatedly and delete it when it it no
33 %description -l pl.UTF-8
34 Jedna z bardzo przydatnych możliwości Perla to w miarę tania zamiana
35 znaków przez operator tr///. Niestety Perl wymaga, aby tr/// było
36 znane w czasie kompilacji. Popularne rozwiązanie to otoczenie przez
37 eval wszystkich dynamicznych operacji tr///, ale ma to bardzo duży
38 narzut czasowy, jeśli jest używane często (na przykład w pętli). Ten
39 moduł rozwiązuje problem poprzez kompilowanie wyrażenia tr/// jeden
40 raz, a następnie pozwolenie użytkownikowi na wielokrotne używanie go
41 i usunięcie, kiedy przestaje być potrzebne.
44 %setup -q -n %{pdir}-%{pnam}-%{version}
47 %{__perl} Makefile.PL \
51 %{?with_tests:%{__make} test}
54 rm -rf $RPM_BUILD_ROOT
57 DESTDIR=$RPM_BUILD_ROOT
60 rm -rf $RPM_BUILD_ROOT
63 %defattr(644,root,root,755)
65 %{perl_vendorlib}/Regexp/Tr.pm