Blob Blame History Raw
Summary:	Pull out the modules a module explicitly uses
Name:		perl-Module-Extract-Use
Version:	1.043
Release:	5%{?dist}
License:	Artistic 2.0
URL:		http://search.cpan.org/dist/Module-Extract-Use/
Source0:	http://search.cpan.org/CPAN/authors/id/B/BD/BDFOY/Module-Extract-Use-%{version}.tar.gz
BuildArch:	noarch
# Module Build
BuildRequires:	coreutils
BuildRequires:	findutils
BuildRequires:	make
BuildRequires:	perl-interpreter >= 4:5.10.0
BuildRequires:	perl-generators
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.64
BuildRequires:	perl(File::Spec)
BuildRequires:	perl(File::Spec::Functions)
BuildRequires:	perl(Test::Manifest) >= 1.21
# Module Runtime
BuildRequires:	perl(PPI)
BuildRequires:	perl(strict)
BuildRequires:	perl(subs)
BuildRequires:	perl(vars)
BuildRequires:	perl(warnings)
# Test Suite
BuildRequires:	perl(Data::Dumper)
BuildRequires:	perl(File::Basename)
BuildRequires:	perl(Test::More)
# Optional Tests
BuildRequires:	perl(Test::Pod) >= 1.00
BuildRequires:	perl(Test::Pod::Coverage) >= 1.00
# Dependencies
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires:	perl(PPI)

%description
Extract the names of the modules used in a file using a static analysis. Since
this module does not run code, it cannot find dynamic uses of modules, such as
eval "require $class". It only reports modules that the file loads directly.
Modules loaded with parent or base, for instance, will be in the import list
for those pragmas but won't have separate entries in the data this module
returns.

%prep
%setup -q -n Module-Extract-Use-%{version}

%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
%if 0%{?_licensedir:1}
%license LICENSE
%else
%doc LICENSE
%endif
%doc Changes examples/ README.pod
%{perl_vendorlib}/Module/
%{_mandir}/man3/Module::Extract::Use.3*

%changelog
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.043-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.043-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.043-3
- Perl 5.26 rebuild

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.043-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Fri Feb  3 2017 Paul Howarth <paul@city-fan.org> - 1.043-1
- Update to 1.043
  - Clarified license as Artistic 2.0
    (https://github.com/briandfoy/module-extract-use/issues/3)

* Wed Feb  1 2017 Paul Howarth <paul@city-fan.org> - 1.04.2-1
- Update to 1.042
  - The -l and -j options work on the list of namespaces from all files
    together instead of the list per file; otherwise, strict and warnings
    for example always show up multiple times
  - Add JSON and simple list outputs for examples/extract_modules

* Fri Nov 25 2016 Paul Howarth <paul@city-fan.org> - 1.04-2
- Sanitize for Fedora submission

* Fri Nov 25 2016 Paul Howarth <paul@city-fan.org> - 1.04-1
- Initial RPM version