]> git.pld-linux.org Git - packages/perl-Class-Load.git/blame - perl-Class-Load.spec
- updated to 0.23
[packages/perl-Class-Load.git] / perl-Class-Load.spec
CommitLineData
11ae5139
JB
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
5%define pdir Class
6%define pnam Load
7%include /usr/lib/rpm/macros.perl
8Summary: Class::Load - a working (require "Class::Name") and more
9Summary(pl.UTF-8): Class::Load - działające (require "Klasa::Nazwa") i inne
10Name: perl-Class-Load
fb17f18c 11Version: 0.23
11ae5139
JB
12Release: 1
13# same as perl
14License: GPL v1+ or Artistic
15Group: Development/Languages/Perl
79c824dc 16Source0: http://www.cpan.org/modules/by-module/Class/%{pdir}-%{pnam}-%{version}.tar.gz
fb17f18c 17# Source0-md5: 080973026b82051117b6c18f5d77aaa9
11ae5139 18URL: http://search.cpan.org/dist/Class-Load/
96ab70a5 19BuildRequires: perl-ExtUtils-MakeMaker >= 6.30
11ae5139
JB
20BuildRequires: perl-devel >= 1:5.8.0
21BuildRequires: rpm-perlprov >= 4.1-13
22%if %{with tests}
fb17f18c 23BuildRequires: perl-Data-OptList
96ab70a5
JB
24BuildRequires: perl-Module-Implementation >= 0.04
25BuildRequires: perl-Module-Runtime >= 0.012
26BuildRequires: perl-Package-Stash >= 0.14
fb17f18c 27BuildRequires: perl-Scalar-List-Utils
11ae5139 28BuildRequires: perl-Test-Fatal
96ab70a5
JB
29BuildRequires: perl-Test-Requires
30BuildRequires: perl-Test-Simple >= 0.88
31BuildRequires: perl-Try-Tiny
21fca0b3 32BuildRequires: perl-version
11ae5139
JB
33%endif
34BuildArch: noarch
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38require EXPR only accepts Class/Name.pm style module names, not
39Class::Name. How frustrating! For that, we provide load_class
40'Class::Name'.
41
42It's often useful to test whether a module can be loaded, instead of
43throwing an error when it's not available. For that, we provide
44try_load_class 'Class::Name'.
45
46Finally, sometimes we need to know whether a particular class has been
47loaded. Asking %%INC is an option, but that will miss inner packages
48and any class for which the filename does not correspond to the
49package name. For that, we provide is_class_loaded 'Class::Name'.
50
51%description -l pl.UTF-8
52require EXPR przyjmuje tylko nazwy modułów w stylu Klasa/Nazwa.pm, a
53nie Klasa::Nazwa - jest to frustrujące. Dlatego moduł ten udostępnia
54funkcję load_class 'Klasa::Nazwa'.
55
56Często przydaje się sprawdzić, czy moduł może być załadowany, zamiast
57rzucania błędu, kiedy jest niedostępny. Dlatego modułu ten udostępnia
58funkcję try_load_class 'Klasa::Nazwa'.
59
60W końcu - czasem trzeba sprawdzić, czy dana klasa została załadowana.
61Sprawdzanie %%INC jest jakąś opcją, ale pominie pakiety i klasy, dla
62których nazwa pliku nie zgadza się z nazwą pakietu. Dlatego moduł ten
63udostępnia funkcję is_class_loaded 'Klasa::Nazwa'.
64
65%prep
66%setup -q -n %{pdir}-%{pnam}-%{version}
67
68%build
69%{__perl} Makefile.PL \
70 INSTALLDIRS=vendor
71%{__make}
72
73%{?with_tests:%{__make} test}
74
75%install
76rm -rf $RPM_BUILD_ROOT
77
78%{__make} pure_install \
79 DESTDIR=$RPM_BUILD_ROOT
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
84%files
85%defattr(644,root,root,755)
fb17f18c 86%doc Changes README
11ae5139 87%{perl_vendorlib}/Class/Load.pm
dba777b1 88%{perl_vendorlib}/Class/Load
11ae5139 89%{_mandir}/man3/Class::Load.3pm*
This page took 0.151411 seconds and 4 git commands to generate.