660b26d
# Test::Warnings introduced in Fedora 18
660b26d
%if 0%{?fedora} < 18 && 0%{?rhel} < 7
660b26d
%global no_test_warnings 1
660b26d
%else
660b26d
%global no_test_warnings 0
660b26d
%endif
660b26d
5113013
Name:		perl-Exporter-Tiny
660b26d
Version:	0.040
660b26d
Release:	1%{?dist}
5113013
Summary:	An exporter with the features of Sub::Exporter but only core dependencies
5113013
License:	GPL+ or Artistic
5113013
Group:		Development/Libraries
5113013
URL:		http://search.cpan.org/dist/Exporter-Tiny/
5113013
Source0:	http://search.cpan.org/CPAN/authors/id/T/TO/TOBYINK/Exporter-Tiny-%{version}.tar.gz
5113013
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
5113013
BuildArch:	noarch
5113013
# Module Build
3ebb26a
BuildRequires:	perl
5113013
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.17
5113013
# Module Runtime
5113013
BuildRequires:	perl(Carp)
5113013
BuildRequires:	perl(strict)
5113013
BuildRequires:	perl(warnings)
5113013
# Test Suite
5113013
BuildRequires:	perl(lib)
5113013
BuildRequires:	perl(Test::More) >= 0.47
660b26d
# Optional Tests
660b26d
BuildRequires:	perl(Test::Fatal)
660b26d
%if ! %{no_test_warnings}
660b26d
BuildRequires:	perl(Test::Warnings)
660b26d
%endif
5113013
# Runtime
5113013
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
5113013
Requires:	perl(Carp)
5113013
5113013
# Avoid doc-file dependency on perl(base)
5113013
%{?perl_default_filter}
5113013
5113013
%description
5113013
Exporter::Tiny supports many of Sub::Exporter's external-facing features
5113013
including renaming imported functions with the -as, -prefix and -suffix
5113013
options; explicit destinations with the into option; and alternative
5113013
installers with the installer option. But it's written in only about 40%%
5113013
as many lines of code and with zero non-core dependencies.
5113013
5113013
Its internal-facing interface is closer to Exporter.pm, with configuration
5113013
done through the @EXPORT, @EXPORT_OK and %%EXPORT_TAGS package variables.
5113013
5113013
Exporter::Tiny performs most of its internal duties (including resolution of
5113013
tag names to sub names, resolution of sub names to coderefs, and installation
5113013
of coderefs into the target package) as method calls, which means they can be
5113013
overridden to provide interesting behavior.
5113013
5113013
%prep
5113013
%setup -q -n Exporter-Tiny-%{version}
5113013
5113013
%build
5113013
perl Makefile.PL INSTALLDIRS=vendor
5113013
make %{?_smp_mflags}
5113013
5113013
%install
5113013
rm -rf %{buildroot}
5113013
make pure_install DESTDIR=%{buildroot}
5113013
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
5113013
%{_fixperms} %{buildroot}
5113013
5113013
%check
5113013
make test
5113013
5113013
%clean
5113013
rm -rf %{buildroot}
5113013
5113013
%files
660b26d
%if 0%{?_licensedir:1}
660b26d
%license COPYRIGHT LICENSE
660b26d
%else
660b26d
%doc COPYRIGHT LICENSE
660b26d
%endif
660b26d
%doc Changes CONTRIBUTING CREDITS README
5113013
%doc examples/
5113013
%{perl_vendorlib}/Exporter/
5113013
%{_mandir}/man3/Exporter::Tiny.3pm*
5113013
%{_mandir}/man3/Exporter::Shiny.3pm*
5113013
5113013
%changelog
660b26d
* Wed Sep 17 2014 Paul Howarth <paul@city-fan.org> - 0.040-1
660b26d
- Update to 0.040
660b26d
  - Document warning and error messages produced by Exporter::Tiny
660b26d
  - Exporter::Tiny would previously cause B.pm to be loaded into memory any
660b26d
    time it exported anything: it no longer does
660b26d
  - No longer die when redefining locally defined subs
660b26d
  - Warn when redefining any subs
660b26d
- Use %%license where possible
660b26d
491e988
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.038-3
491e988
- Perl 5.20 rebuild
491e988
5c2df44
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.038-2
5c2df44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
5c2df44
3ebb26a
* Fri Apr  4 2014 Paul Howarth <paul@city-fan.org> - 0.038-1
3ebb26a
- Update to 0.038
3ebb26a
  - Added: Support Exporter.pm's import negation syntax qw( !foo )
3ebb26a
  - Added: Support Exporter.pm's regexp import syntax qw( /foo/ )
3ebb26a
  - Fix minor error in documentation of generators
3ebb26a
  - Improved handling of hashrefs of options passed to tags, and hashrefs of
3ebb26a
    options found within %%EXPORT_TAGS arrayrefs
3ebb26a
  - Only attempt to merge hashes if we're sure they're both really hashes!
3ebb26a
5113013
* Mon Mar 17 2014 Paul Howarth <paul@city-fan.org> - 0.036-2
5113013
- Sanitize for Fedora submission
5113013
5113013
* Thu Mar 13 2014 Paul Howarth <paul@city-fan.org> - 0.036-1
5113013
- Initial RPM version