3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
8 Summary: UNIVERSAL::require - require() modules from a variable
9 Summary(pl.UTF-8): UNIVERSAL::require - wymaganie modułów ze zmiennej
10 Name: perl-UNIVERSAL-require
14 License: GPL v1+ or Artistic
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/UNIVERSAL/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5: e6ea431fac9524077414d531a8cc203c
18 URL: http://search.cpan.org/dist/UNIVERSAL-require/
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
21 Conflicts: perl-UNIVERSAL-exports < 0.03-3
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 If you've ever had to do this...
28 eval "require $module";
30 to get around the bareword caveats on require(), this module is for
31 you. It creates a universal require() class method that will work with
32 every Perl module and it's secure. So instead of doing some arcane
33 eval() work, you can do this:
37 %description -l pl.UTF-8
38 Jeśli kiedykolwiek było nam potrzebne...
40 eval "require $module";
42 do obejścia przeciwności require(), ten moduł jest dla nas. Tworzy
43 uniwersalną metodę klasy require() działającą z każdym modułem Perla,
44 a jednocześnie bezpieczną. Czyli zamiast wykonywania jakichś tajemnych
45 działań z eval(), można zrobić:
50 %setup -q -n %{pdir}-%{pnam}-%{version}
53 %{__perl} Makefile.PL \
57 %{?with_tests:%{__make} test}
60 rm -rf $RPM_BUILD_ROOT
63 DESTDIR=$RPM_BUILD_ROOT
66 rm -rf $RPM_BUILD_ROOT
69 %defattr(644,root,root,755)
71 %{perl_vendorlib}/UNIVERSAL/*.pm