3 %bcond_without tests # do not perform "make test"
7 Summary: Devel::Hide - Forces the unavailability of specified Perl modules (for testing)
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/Devel/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5: 3b38c60feed1e922093f5f68dd6d5c20
17 URL: http://search.cpan.org/dist/Devel-Hide/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 Given a list of Perl modules/filenames, this module makes require and
27 use statements fail (no matter the specified files/modules are
30 They die with a message like:
32 Can't locate Module/ToHide.pm (hidden)
34 The original intent of this module is to allow Perl developers to test
35 for alternative behavior when some modules are not available. In a
36 Perl installation, where many modules are already installed, there is
37 a chance to screw things up because you take for granted things that
38 may not be there in other machines.
40 For example, to test if your distribution does the right thing when a
41 module is missing, you can do
43 # %description -l pl.UTF-8
46 %setup -q -n %{pdir}-%{pnam}-%{version}
49 %{__perl} Makefile.PL \
53 %{?with_tests:%{__make} test}
56 rm -rf $RPM_BUILD_ROOT
58 %{__make} pure_install \
59 DESTDIR=$RPM_BUILD_ROOT
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
67 %{perl_vendorlib}/Devel/*.pm