]> git.pld-linux.org Git - SPECS.git/blob - perl-Tie-Restore.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / perl-Tie-Restore.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 #
5 %define         pdir    Tie
6 %define         pnam    Restore
7 Summary:        Tie::Restore - restores ties to an existing object
8 Summary(pl.UTF-8):      Tie::Restore - odtworzenie powiązań do istniejącego obiektu
9 Name:           perl-Tie-Restore
10 Version:        0.11
11 Release:        3
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:  1300dfc45d0eb7e4cf0634c81c030230
17 Patch0:         %{name}-path.patch
18 URL:            http://search.cpan.org/dist/Tie-Restore/
19 BuildRequires:  perl-devel >= 1:5.8.0
20 BuildRequires:  rpm-perlprov >= 4.1-13
21 BuildArch:      noarch
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 Provides the opposite of the 'tied' function. Say you have %%hash that
26 is tied to $object. Then, it is relatively simple to get $object from
27 %%hash simply by saying
28
29         $object = tied %%hash;
30
31 But, how does one go the other way? Simple, with Tie::Restore
32
33         tie %%hash, 'Tie::Restore', $object;
34
35 Works for any kind of tie. (scalar, array, hash, filehandle)
36
37 %description -l pl.UTF-8
38 Ten moduł dostarcza odwrotność funkcji 'tied'. Załóżmy, że mamy %%hash
39 przywiązany do obiektu $object. Wtedy można stosunkowo prosto otrzymać
40 $object z %%hash poprzez
41
42         $object = tied %%hash;
43
44 Ale jak teraz zrobić na odwrót? Proste, przy użyciu Tie::Restore:
45
46         tie %%hash, 'Tie::Restore', $object;
47
48 Działa z dowolnym rodzajem przywiązania (skalarem, tablicą, tablicą
49 asocjacyjną, uchwytem do pliku).
50
51 %prep
52 %setup -q -n %{pdir}-%{pnam}-%{version}
53 %patch0 -p1
54
55 %build
56 %{__perl} Makefile.PL \
57         INSTALLDIRS=vendor
58 %{__make}
59
60 %{?with_tests:%{__make} test}
61
62 %install
63 rm -rf $RPM_BUILD_ROOT
64
65 %{__make} install \
66         DESTDIR=$RPM_BUILD_ROOT
67
68 %clean
69 rm -rf $RPM_BUILD_ROOT
70
71 %files
72 %defattr(644,root,root,755)
73 %doc Changes README
74 %{perl_vendorlib}/Tie/*.pm
75 %{_mandir}/man3/*
This page took 0.270323 seconds and 3 git commands to generate.