Chris Weyl 8d9f39b
Name:           perl-Test-use-ok
Chris Weyl 8d9f39b
Version:        0.02
Chris Weyl 007f07f
Release:        3%{?dist}
Chris Weyl 8d9f39b
Summary:        Alternative to Test::More::use_ok
Chris Weyl 8d9f39b
License:        MIT 
Chris Weyl 8d9f39b
Group:          Development/Libraries
Chris Weyl 8d9f39b
URL:            http://search.cpan.org/dist/Test-use-ok/
Chris Weyl 8d9f39b
Source0:        http://www.cpan.org/authors/id/A/AU/AUDREYT/Test-use-ok-%{version}.tar.gz
Chris Weyl 8d9f39b
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Chris Weyl 8d9f39b
BuildArch:      noarch
Chris Weyl 8d9f39b
BuildRequires:  perl >= 0:5.005
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
# core:
Chris Weyl 8d9f39b
BuildRequires:  perl(ExtUtils::MakeMaker)
Chris Weyl 8d9f39b
BuildRequires:  perl(Test::More)
Chris Weyl 8d9f39b
BuildRequires:  perl(Test::Harness)
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
%description
Chris Weyl 8d9f39b
According to the Test::More documentation, it is recommended to run
Chris Weyl 8d9f39b
use_ok() inside a BEGIN block, so functions are exported at compile-time
Chris Weyl 8d9f39b
and prototypes are properly honored.
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
However, people often either forget to add "BEGIN", or mistakenly group 
Chris Weyl 8d9f39b
"use_ok" with other tests in a single "BEGIN" block, which can create
Chris Weyl 8d9f39b
subtle differences in execution order.
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
With this module, simply change all "use_ok" in test scripts to "use ok", 
Chris Weyl 8d9f39b
and they will be executed at "BEGIN" time. The explicit space after "use"
Chris Weyl 8d9f39b
makes it clear that this is a single compile-time action.
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
%prep
Chris Weyl 8d9f39b
%setup -q -n Test-use-ok-%{version}
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
%build
Chris Weyl 8d9f39b
%{__perl} Makefile.PL INSTALLDIRS=vendor
Chris Weyl 8d9f39b
make %{?_smp_mflags}
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
%install
Chris Weyl 8d9f39b
rm -rf %{buildroot}
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
make pure_install PERL_INSTALL_ROOT=%{buildroot}
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
Chris Weyl 8d9f39b
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
%{_fixperms} %{buildroot}/*
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
%check
Chris Weyl 8d9f39b
make test
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
%clean
Chris Weyl 8d9f39b
rm -rf %{buildroot}
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
%files
Chris Weyl 8d9f39b
%defattr(-,root,root,-)
Chris Weyl 8d9f39b
%doc Changes README t/
Chris Weyl 8d9f39b
%{perl_vendorlib}/*
Chris Weyl 8d9f39b
%{_mandir}/man3/*
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
%changelog
Chris Weyl 007f07f
* Mon Apr 30 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.02-3
Chris Weyl 007f07f
- bump
Chris Weyl 007f07f
Chris Weyl 8d9f39b
* Tue Apr 10 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.02-2
Chris Weyl 8d9f39b
- updated with core modules as BR's
Chris Weyl 8d9f39b
Chris Weyl 8d9f39b
* Tue Apr 10 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.02-1
Chris Weyl 8d9f39b
- Specfile autogenerated by cpanspec 1.70.