commit 1bb5cc6369ca5027f43f6075efeaba04c34f7187 Author: Paul Howarth <p...@city-fan.org> Date: Tue Dec 21 09:30:47 2010 +0000
Initial import of perl-Class-Load-0.06-2 .gitignore | 1 + perl-Class-Load.spec | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 63 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..a3c706b 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Class-Load-0.06.tar.gz diff --git a/perl-Class-Load.spec b/perl-Class-Load.spec new file mode 100644 index 0000000..51b42b1 --- /dev/null +++ b/perl-Class-Load.spec @@ -0,0 +1,61 @@ +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 <p...@city-fan.org> - 0.06-2 +- Sanitize spec for Fedora submission + +* Mon Nov 22 2010 Paul Howarth <p...@city-fan.org> - 0.06-1 +- Initial RPM version diff --git a/sources b/sources index e69de29..1019f75 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5aea2e7c66e69dafdbfedc00e93f9f46 Class-Load-0.06.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/perl-devel