3 %bcond_with tests # perform "make test"
4 # Text::TabularDisplay 1.21 not available yet
7 %define pnam RecordParser
8 Summary: Text::RecordParser - read record-oriented files
9 Summary(pl.UTF-8): Text::RecordParser - odczyt plików rekordowych
10 Name: perl-Text-RecordParser
14 License: GPL v1+ or Artistic
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/Text/%{pdir}-%{pnam}-v%{version}.tar.gz
17 # Source0-md5: 65c2a85a2ed2a9bc791d377954bd5a44
18 URL: http://search.cpan.org/dist/Text-RecordParser/
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
22 BuildRequires: perl-Text-TabularDisplay >= 1.21
23 BuildConflicts: perl-Text-TabularDisplay = 1.20
25 # sigh... perl.prov can't handle version->new(...) -- Safe.pm
26 Provides: perl(Text::RecordParser) = %{version}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 %define _noautoreq 'perl(Text::RecordParser)'
33 This module is for reading record-oriented data. The most common
34 example have records separated by newlines and fields separated by
35 commas or tabs, but this module aims to provide a consistent interface
36 for handling sequential records in a file however they may be
37 delimited. Typically this data lists the fields in the first line of
38 the file, in which case you should call bind_header to bind the field
39 name. If the first line contains data, you can still bind your own
40 field names via bind_fields. Either way, you can then use many methods
41 to get at the data as arrays or hashes.
43 %description -l pl.UTF-8
44 Ten moduł służy do czytania danych zorientowanych rekordowo.
45 Najpopularniejszy przykład to rekordy oddzielone nowymi liniami i pola
46 oddzielone przecinkami lub tabulatorami, ale celem tego modułu jest
47 dostarczenie spójnego interfejsu do obsługi sekwencyjnych rekordów w
48 pliku niezależnie od sposobu ich rozdzielenia. Typowo dane te
49 określają pola w pierwszej linii pliku - w tym przypadku należy
50 wywołać bind_header aby podpiąć nazwy pól. Jeśli pierwsza linia
51 zawiera dane, nadal można podpiąć własne nazwy pól poprzez
52 bind_fields. W każdym przypadku można potem używać wielu metod
53 pobierania danych jako tablice lub hasze.
56 %setup -q -n %{pdir}-%{pnam}-v%{version}
59 %{__perl} Makefile.PL \
63 %{?with_tests:%{__make} test}
66 rm -rf $RPM_BUILD_ROOT
69 DESTDIR=$RPM_BUILD_ROOT
72 rm -rf $RPM_BUILD_ROOT
75 %defattr(644,root,root,755)
76 %doc Changes INSTALL TODO
77 %attr(755,root,root) %{_bindir}/*
78 %{perl_vendorlib}/Text/*.pm
79 %{perl_vendorlib}/Text/RecordParser