]>
Commit | Line | Data |
---|---|---|
c0f114cf | 1 | # |
2 | # Conditional build: | |
dc1a74a2 | 3 | %bcond_with tests # perform "make test" |
d0992e0a | 4 | |
d8b7cd00 | 5 | %define pdir Devel |
6 | %define pnam Memo | |
d0992e0a | 7 | %include /usr/lib/rpm/macros.perl |
808ab487 | 8 | Summary: Devel::Memo - memoize function calls |
01f09842 | 9 | Summary(pl.UTF-8): Devel::Memo - zapamiętujący wywołania funkcji |
6cc3ba77 | 10 | Name: perl-Devel-Memo |
11 | Version: 0.004 | |
26666c02 | 12 | Release: 13 |
6f7836a1 | 13 | # same as perl |
14 | License: GPL v1+ or Artistic | |
6cc3ba77 | 15 | Group: Development/Languages/Perl |
583c0d1d | 16 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz |
67d33229 | 17 | # Source0-md5: 8bb2fee3416368db795555feee4261a8 |
d0992e0a | 18 | URL: http://search.cpan.org/dist/Devel-Memo/ |
c7c0433b | 19 | BuildRequires: perl-devel >= 1:5.8.0 |
d0992e0a | 20 | BuildRequires: rpm-perlprov >= 4.1-13 |
dc1a74a2 | 21 | %if %{with tests} |
6cc3ba77 | 22 | BuildRequires: perl-FreezeThaw |
c0f114cf | 23 | BuildRequires: perl-Test-Helper |
24 | %endif | |
d1825b3b | 25 | BuildArch: noarch |
c7e95fa8 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
6cc3ba77 | 27 | |
28 | %description | |
808ab487 JB |
29 | Devel::Memo permits you to create function objects (i.e. blessed |
30 | code-refs which can be bound to subroutine cells) which are called | |
31 | exactly like a regular subroutine (which you supply), but which | |
32 | memoize their arguments and results with each invocation, so that | |
33 | unnecessary recomputation is avoided. Internally, the FreezeThaw | |
34 | module is used to assist in the caching. | |
35 | ||
d0f10b06 JR |
36 | %description -l pl.UTF-8 |
37 | Moduł Devel::Memo umożliwia tworzenie obiektów funkcji (czyli | |
38 | pobłogosławionych code-refs, które mogą być przypisane do komórek | |
39 | procedur), które są wywoływane dokładnie tak jak normalne procedury | |
40 | (które się podaje), ale przy każdym wywołaniu zapamiętują parametry i | |
41 | wyniki, zapobiegając niepotrzebnym ponownym obliczeniom. Wewnętrznie | |
42 | używany jest moduł FreezeThaw, pomagający przy buforowaniu. | |
6cc3ba77 | 43 | |
44 | %prep | |
37442179 | 45 | %setup -q -n %{pdir}-%{pnam}-%{version} |
6cc3ba77 | 46 | |
47 | %build | |
89615fb0 | 48 | %{__perl} Makefile.PL \ |
d2af483d | 49 | INSTALLDIRS=vendor |
3ff28af4 | 50 | %{__make} |
6cc3ba77 | 51 | |
448c4316 | 52 | %{?with_tests:%{__make} test} |
53 | ||
6cc3ba77 | 54 | %install |
55 | rm -rf $RPM_BUILD_ROOT | |
6cc3ba77 | 56 | |
448c4316 | 57 | %{__make} install \ |
58 | DESTDIR=$RPM_BUILD_ROOT | |
6cc3ba77 | 59 | |
6cc3ba77 | 60 | %clean |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %files | |
64 | %defattr(644,root,root,755) | |
9f4ab830 | 65 | %doc README TODO CHANGES |
89615fb0 | 66 | %{perl_vendorlib}/Devel/Memo.pm |
6cc3ba77 | 67 | %{_mandir}/man3/* |