]>
Commit | Line | Data |
---|---|---|
372afb6d | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
491ff6a9 | 4 | |
68327dcd | 5 | %define pdir Data |
6 | %define pnam Denter | |
8e5d6fb3 | 7 | Summary: Data::Denter - an (deprecated) alternative to Data::Dumper and Storable |
96067c2a | 8 | Summary(pl.UTF-8): Data::Denter - (porzucona) alternatywa dla Data::Dumper i Storable |
372afb6d | 9 | Name: perl-Data-Denter |
10 | Version: 0.15 | |
d61bcea4 | 11 | Release: 2 |
372afb6d | 12 | # same as perl |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz | |
16 | # Source0-md5: 819e5c05fb61e90f4c1311286b080405 | |
491ff6a9 | 17 | URL: http://search.cpan.org/dist/Data-Denter/ |
1266bbb2 | 18 | BuildRequires: perl-devel >= 1:5.8.0 |
372afb6d | 19 | BuildRequires: rpm-perlprov >= 4.1-13 |
20 | %if %{with tests} | |
e2fde207 | 21 | # for perldiag.pod; should it be moved to perl-base? |
372afb6d | 22 | BuildRequires: perl-YAML |
491ff6a9 | 23 | BuildRequires: perl-perldoc |
372afb6d | 24 | %endif |
25 | BuildArch: noarch | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | The main problem with Data::Dumper (one of my all-time favorite | |
1266bbb2 JB |
30 | modules) is that you have to use eval() to deserialize the data you've |
31 | dumped. This is great if you can trust the data you're evaling, but | |
32 | horrible if you can't. A good alternative is Storable.pm. It can | |
372afb6d | 33 | safely thaw your frozen data. But if you want to read/edit the frozen |
34 | data, you're out of luck, because Storable uses a binary format. Even | |
1266bbb2 JB |
35 | Data::Dumper's output can be a little cumbersome for larger data |
36 | objects. | |
372afb6d | 37 | |
2cebab58 JR |
38 | %description -l pl.UTF-8 |
39 | Głównym problemem klasy Data::Dumper (jednego z ulubionych modułów | |
40 | autora) jest to, że trzeba używać eval() aby dokonać deserializacji | |
41 | zrzuconych danych. Jest to wspaniałe, jeśli można zaufać danym, ale | |
42 | przerażające, jeśli nie możemy. Dobrą alternatywą jest moduł | |
43 | Storable.pm. Może on bezpiecznie roztopić zamrożone dane. Ale kiedy | |
44 | chcemy odczytać/zmodyfikować zamrożone dane, nie mamy szczęścia, | |
45 | ponieważ Storable używa binarnego formatu. Nawet format wyjścia modułu | |
46 | Data::Dumper może by nieco niewygodny dla większych obiektów danych. | |
372afb6d | 47 | |
48 | %prep | |
49 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
50 | ||
51 | %build | |
52 | %{__perl} Makefile.PL \ | |
53 | INSTALLDIRS=vendor | |
54 | %{__make} | |
55 | ||
56 | %{?with_tests:%{__make} test} | |
57 | ||
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %{__make} install \ | |
62 | DESTDIR=$RPM_BUILD_ROOT | |
63 | ||
64 | %clean | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc Changes README | |
1266bbb2 | 70 | %{perl_vendorlib}/Data/*.pm |
372afb6d | 71 | %{_mandir}/man3/* |