--- /dev/null
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+#
+%define pdir Module
+%define pnam Path
+Summary: Module::Path - get the full path to a locally installed module
+Name: perl-Module-Path
+Version: 0.19
+Release: 1
+License: GPL v1+ or Artistic
+Group: Development/Languages/Perl
+Source0: http://www.cpan.org/modules/by-module/Module/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 8f409cc8654c5b3896f5d2770e07ddab
+URL: https://metacpan.org/release/Module-Path
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: rpmbuild(macros) >= 1.745
+%if %{with tests}
+BuildRequires: perl(Devel::FindPerl)
+%endif
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This module provides a single function, module_path(), which takes a
+module name and finds the first directory in your @INC path where the
+module is installed locally. It returns the full path to that file,
+resolving any symlinks. It is portable and only depends on core
+modules.
+
+It works by looking in all the directories in @INC for an
+appropriately named file:
+
+I wrote this module because I couldn't find an alternative which dealt
+with the points listed above, and didn't pull in what seemed like too
+many dependencies to me.
+
+The distribution for Module::Path includes the mpath script, which
+lets you get the path for a module from the command-line:
+
+% mpath Module::Path
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' bin/mpath
+
+%build
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%{_bindir}/mpath
+%{perl_vendorlib}/Module/Path.pm
+%{_mandir}/man1/mpath.1*
+%{_mandir}/man3/Module::Path.3pm.gz