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