Chris Weyl 8d9f39b
Name:           perl-Test-use-ok
Chris Weyl 8d9f39b
Version:        0.02
37e7402
Release:        8%{?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
37e7402
* Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.02-8
37e7402
- Mass rebuild with perl-5.12.0
37e7402
e87a164
* Fri Dec  4 2009 Stepan Kasal <skasal@redhat.com> - 0.02-7
e87a164
- rebuild against perl 5.10.1
e87a164
b89b23f
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.02-6
b89b23f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b89b23f
765a69e
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.02-5
765a69e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
765a69e
1d15cbf
* Wed Mar  5 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.02-4
1d15cbf
- rebuild for new perl
1d15cbf
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.