Author: qboosh Date: Fri Mar 4 16:49:21 2011 GMT Module: packages Tag: HEAD ---- Log message: - new
---- Files affected: packages/perl-Class-Load: perl-Class-Load.spec (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/perl-Class-Load/perl-Class-Load.spec diff -u /dev/null packages/perl-Class-Load/perl-Class-Load.spec:1.1 --- /dev/null Fri Mar 4 17:49:21 2011 +++ packages/perl-Class-Load/perl-Class-Load.spec Fri Mar 4 17:49:16 2011 @@ -0,0 +1,88 @@ +# $Revision$, $Date$ +# +# Conditional build: +%bcond_without tests # do not perform "make test" +# +%define pdir Class +%define pnam Load +%include /usr/lib/rpm/macros.perl +Summary: Class::Load - a working (require "Class::Name") and more +Summary(pl.UTF-8): Class::Load - działające (require "Klasa::Nazwa") i inne +Name: perl-Class-Load +Version: 0.06 +Release: 1 +# same as perl +License: GPL v1+ or Artistic +Group: Development/Languages/Perl +Source0: http://www.cpan.org/modules/by-module/Class/SARTAK/Class-Load-%{version}.tar.gz +# Source0-md5: 5aea2e7c66e69dafdbfedc00e93f9f46 +URL: http://search.cpan.org/dist/Class-Load/ +BuildRequires: perl-devel >= 1:5.8.0 +BuildRequires: rpm-perlprov >= 4.1-13 +%if %{with tests} +BuildRequires: perl-Test-Fatal +%endif +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +require EXPR only accepts Class/Name.pm style module names, not +Class::Name. How frustrating! For that, we provide load_class +'Class::Name'. + +It's often useful to test whether a module can be loaded, instead of +throwing an error when it's not available. For that, we provide +try_load_class 'Class::Name'. + +Finally, sometimes we need to know whether a particular class has been +loaded. Asking %%INC is an option, but that will miss inner packages +and any class for which the filename does not correspond to the +package name. For that, we provide is_class_loaded 'Class::Name'. + +%description -l pl.UTF-8 +require EXPR przyjmuje tylko nazwy modułów w stylu Klasa/Nazwa.pm, a +nie Klasa::Nazwa - jest to frustrujące. Dlatego moduł ten udostępnia +funkcję load_class 'Klasa::Nazwa'. + +Często przydaje się sprawdzić, czy moduł może być załadowany, zamiast +rzucania błędu, kiedy jest niedostępny. Dlatego modułu ten udostępnia +funkcję try_load_class 'Klasa::Nazwa'. + +W końcu - czasem trzeba sprawdzić, czy dana klasa została załadowana. +Sprawdzanie %%INC jest jakąś opcją, ale pominie pakiety i klasy, dla +których nazwa pliku nie zgadza się z nazwą pakietu. Dlatego moduł ten +udostępnia funkcję is_class_loaded 'Klasa::Nazwa'. + +%prep +%setup -q -n %{pdir}-%{pnam}-%{version} + +%build +%{__perl} Makefile.PL \ + INSTALLDIRS=vendor +%{__make} + +%{?with_tests:%{__make} test} + +%install +rm -rf $RPM_BUILD_ROOT + +%{__make} pure_install \ + DESTDIR=$RPM_BUILD_ROOT + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(644,root,root,755) +%doc Changes +%{perl_vendorlib}/Class/Load.pm +%{_mandir}/man3/Class::Load.3pm* + +%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) +%changelog +* %{date} PLD Team <[email protected]> +All persons listed below can be reached at <cvs_login>@pld-linux.org + +$Log$ +Revision 1.1 2011/03/04 16:49:16 qboosh +- new ================================================================ _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
