From 8d9f39b9d29c36a9e5023cf73d60faa3fd5c3fbd Mon Sep 17 00:00:00 2001 From: Chris Weyl Date: Apr 30 2007 20:37:37 +0000 Subject: initial import --- diff --git a/.cvsignore b/.cvsignore index e69de29..b226181 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +Test-use-ok-0.02.tar.gz diff --git a/perl-Test-use-ok.spec b/perl-Test-use-ok.spec new file mode 100644 index 0000000..eebd002 --- /dev/null +++ b/perl-Test-use-ok.spec @@ -0,0 +1,67 @@ +Name: perl-Test-use-ok +Version: 0.02 +Release: 2%{?dist} +Summary: Alternative to Test::More::use_ok +License: MIT +Group: Development/Libraries +URL: http://search.cpan.org/dist/Test-use-ok/ +Source0: http://www.cpan.org/authors/id/A/AU/AUDREYT/Test-use-ok-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: perl >= 0:5.005 + +# core: +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Harness) + +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description +According to the Test::More documentation, it is recommended to run +use_ok() inside a BEGIN block, so functions are exported at compile-time +and prototypes are properly honored. + +However, people often either forget to add "BEGIN", or mistakenly group +"use_ok" with other tests in a single "BEGIN" block, which can create +subtle differences in execution order. + +With this module, simply change all "use_ok" in test scripts to "use ok", +and they will be executed at "BEGIN" time. The explicit space after "use" +makes it clear that this is a single compile-time action. + +%prep +%setup -q -n Test-use-ok-%{version} + +%build +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +rm -rf %{buildroot} + +make pure_install PERL_INSTALL_ROOT=%{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 README t/ +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Tue Apr 10 2007 Chris Weyl 0.02-2 +- updated with core modules as BR's + +* Tue Apr 10 2007 Chris Weyl 0.02-1 +- Specfile autogenerated by cpanspec 1.70. diff --git a/sources b/sources index e69de29..d0c48e2 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c49b0bbb37a6764b8b96d9fcef954ba2 Test-use-ok-0.02.tar.gz