3 %bcond_without tests # do not perform "make test"
7 Summary: File::Slurp - efficient reading/writing of complete files
8 Summary(pl.UTF-8): File::Slurp - wydajny odczyt/zapis całych plików
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/File/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: a10ddfcbe153fc8d0076936ee83b98ed
17 URL: https://metacpan.org/release/File-Slurp
19 BuildRequires: perl(File::Spec) >= 3.01
20 BuildRequires: perl-Scalar-List-Utils >= 1.00
21 BuildRequires: perl-Test-Simple
23 BuildRequires: perl-devel >= 1:5.8.0
24 BuildRequires: rpm-perlprov >= 4.1-13
25 BuildRequires: rpmbuild(macros) >= 1.745
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 This module provides subs that allow you to read or write entire files
31 with one simple call. They are designed to be simple to use, have
32 flexible ways to pass in or get the file contents and to be very
33 efficient. There is also a sub to read in all the files in a directory
36 Note that these slurp/spew subs work only for files and not for pipes
37 or stdio. If you want to slurp the latter, use the standard techniques
38 such as setting $/ to undef, reading <> in a list context, or printing
39 all you want to STDOUT.
41 %description -l pl.UTF-8
42 Ten moduł dostarcza funkcje pozwalające na odczyt lub zapis całych
43 plików pojedynczym wywołaniem. Zostały zaprojektowane tak, aby były
44 proste w użyciu, umożliwiały przekazywanie lub pobieranie zawartości
45 plików w elastyczny sposób oraz były bardzo wydajne. Jest także
46 funkcja do odczytu wszystkich plików w katalogu innym niż . i .. .
48 Należy zauważyć, że te funkcje działają tylko dla plików, a nie
49 potoków czy standardowego wejścia/wyjścia. Dla tych urządzeń pozostają
50 standardowe techniki, takie jak ustawianie $/ na undef, czytanie <> w
51 kontekście listy lub pisanie wszystkiego co chcemy na STDOUT.
54 %setup -q -n %{pdir}-%{pnam}-%{version}
57 %{__perl} Makefile.PL \
61 %{?with_tests:%{__make} test}
64 rm -rf $RPM_BUILD_ROOT
67 DESTDIR=$RPM_BUILD_ROOT
70 rm -rf $RPM_BUILD_ROOT
73 %defattr(644,root,root,755)
74 %doc Changes README.md
75 %{perl_vendorlib}/File/Slurp.pm
76 %{_mandir}/man3/File::Slurp.3pm*