Name: perl-Test-use-ok
Version: 0.02
Release: 3%{?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
* Mon Apr 30 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.02-3
- bump
* Tue Apr 10 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.02-2
- updated with core modules as BR's
* Tue Apr 10 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.02-1
- Specfile autogenerated by cpanspec 1.70.