You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.8 KiB
62 lines
1.8 KiB
14 years ago
|
Name: perl-Class-Load
|
||
|
Version: 0.06
|
||
|
Release: 2%{?dist}
|
||
|
Summary: A working (require "Class::Name") and more
|
||
|
Group: Development/Libraries
|
||
|
License: GPL+ or Artistic
|
||
|
URL: http://search.cpan.org/dist/Class-Load/
|
||
|
Source0: http://search.cpan.org/CPAN/authors/id/S/SA/SARTAK/Class-Load-%{version}.tar.gz
|
||
|
BuildArch: noarch
|
||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
||
|
BuildRequires: perl(Test::Fatal)
|
||
|
BuildRequires: perl(Test::More)
|
||
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||
|
Requires: perl(Exporter)
|
||
|
|
||
|
%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'.
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n Class-Load-%{version}
|
||
|
|
||
|
%build
|
||
|
perl Makefile.PL INSTALLDIRS=vendor
|
||
|
make %{?_smp_mflags}
|
||
|
|
||
|
%install
|
||
|
rm -rf %{buildroot}
|
||
|
make pure_install DESTDIR=%{buildroot}
|
||
|
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
|
||
|
find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
|
||
|
%{_fixperms} %{buildroot}
|
||
|
|
||
|
%check
|
||
|
make test
|
||
|
|
||
|
%clean
|
||
|
rm -rf %{buildroot}
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root,-)
|
||
|
%doc Changes
|
||
|
%{perl_vendorlib}/Class/
|
||
|
%{_mandir}/man3/Class::Load.3pm*
|
||
|
|
||
|
%changelog
|
||
|
* Tue Nov 23 2010 Paul Howarth <paul@city-fan.org> - 0.06-2
|
||
|
- Sanitize spec for Fedora submission
|
||
|
|
||
|
* Mon Nov 22 2010 Paul Howarth <paul@city-fan.org> - 0.06-1
|
||
|
- Initial RPM version
|