Blob Blame History Raw
Name:       perl-Monkey-Patch
Version:    0.03
Release:    1%{?dist}
Summary:    Scoped monkey-patching Perl module
License:    GPL+ or Artistic
URL:        https://metacpan.org/release/Monkey-Patch
Source0:    https://cpan.metacpan.org/authors/id/F/FR/FRODWITH/Monkey-Patch-%{version}.tar.gz
BuildArch:  noarch
# Module Build
BuildRequires:  make
BuildRequires:  perl-generators
BuildRequires:  perl-interpreter
BuildRequires:  perl(ExtUtils::MakeMaker)
# Module Runtime
BuildRequires:  perl(strict)
BuildRequires:  perl(warnings)
BuildRequires:  perl(SUPER)
BuildRequires:  perl(Sub::Delete)
# Tests
BuildRequires:  perl(Test::More)
# Runtime
Requires:  perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires:  perl(SUPER)
Requires:  perl(Sub::Delete)
Patch0:    01_fix_pod.patch

# Avoid doc-file dependency on perl(base)
%{?perl_default_filter}

%description
Monkey patching is a way to extend or modify the runtime code
of a program or library without altering the original source code.

Monkey::Patch provides lexical scope monkey-patching so that you can
wrap any other package's subroutine with your own code and still have
access to the original subroutine.

%prep
%setup -q -n Monkey-Patch-%{version}
%patch0 -p1

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -delete
%{_fixperms} -c %{buildroot}

%check
make test

%files
%license LICENSE
%doc CHANGES README
%{perl_vendorlib}/Monkey/
%{_mandir}/man3/Monkey::Patch.3pm*
%{_mandir}/man3/Monkey::Patch::Handle.3pm*
%{_mandir}/man3/Monkey::Patch::Handle::Class.3pm*
%{_mandir}/man3/Monkey::Patch::Handle::Object.3pm*

%changelog
* Tue Jul 31 2018 Andrea Veri <averi@fedoraproject.org> - 0.03-1
- Initial package release.