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