3 %bcond_without tests # do not perform "make test"
7 Summary: Class::Load - a working (require "Class::Name") and more
8 Summary(pl.UTF-8): Class::Load - działające (require "Klasa::Nazwa") i inne
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/Class/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: e4c831c08df592ce8dfee0c7cfc12fd7
17 URL: http://search.cpan.org/dist/Class-Load/
18 BuildRequires: perl-ExtUtils-MakeMaker >= 6.30
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: rpmbuild(macros) >= 1.745
23 BuildRequires: perl-Data-OptList >= 0.110
24 BuildRequires: perl-Module-Implementation >= 0.04
25 BuildRequires: perl-Module-Runtime >= 0.012
26 BuildRequires: perl-Package-Stash >= 0.14
27 BuildRequires: perl-Scalar-List-Utils
28 BuildRequires: perl-Test-Fatal
29 BuildRequires: perl-Test-Needs
30 BuildRequires: perl-Test-Requires
31 BuildRequires: perl-Test-Simple >= 0.88
32 BuildRequires: perl-Try-Tiny
33 BuildRequires: perl-version
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 require EXPR only accepts Class/Name.pm style module names, not
40 Class::Name. How frustrating! For that, we provide load_class
43 It's often useful to test whether a module can be loaded, instead of
44 throwing an error when it's not available. For that, we provide
45 try_load_class 'Class::Name'.
47 Finally, sometimes we need to know whether a particular class has been
48 loaded. Asking %%INC is an option, but that will miss inner packages
49 and any class for which the filename does not correspond to the
50 package name. For that, we provide is_class_loaded 'Class::Name'.
52 %description -l pl.UTF-8
53 require EXPR przyjmuje tylko nazwy modułów w stylu Klasa/Nazwa.pm, a
54 nie Klasa::Nazwa - jest to frustrujące. Dlatego moduł ten udostępnia
55 funkcję load_class 'Klasa::Nazwa'.
57 Często przydaje się sprawdzić, czy moduł może być załadowany, zamiast
58 rzucania błędu, kiedy jest niedostępny. Dlatego modułu ten udostępnia
59 funkcję try_load_class 'Klasa::Nazwa'.
61 W końcu - czasem trzeba sprawdzić, czy dana klasa została załadowana.
62 Sprawdzanie %%INC jest jakąś opcją, ale pominie pakiety i klasy, dla
63 których nazwa pliku nie zgadza się z nazwą pakietu. Dlatego moduł ten
64 udostępnia funkcję is_class_loaded 'Klasa::Nazwa'.
67 %setup -q -n %{pdir}-%{pnam}-%{version}
70 %{__perl} Makefile.PL \
74 %{?with_tests:%{__make} test}
77 rm -rf $RPM_BUILD_ROOT
79 %{__make} pure_install \
80 DESTDIR=$RPM_BUILD_ROOT
83 rm -rf $RPM_BUILD_ROOT
86 %defattr(644,root,root,755)
88 %{perl_vendorlib}/Class/Load.pm
89 %{perl_vendorlib}/Class/Load
90 %{_mandir}/man3/Class::Load.3pm*