File perl-Module-Mask.spec of Package perl-Module-Mask

# spec file for package perl-Module-Mask
# Copyright (c) 2021 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define cpan_name Module-Mask
Name:           perl-Module-Mask
Version:        0.06
Release:        0
Summary:        Pretend certain modules are not installed
License:        Artistic-1.0 OR GPL-1.0-or-later
URL:  {cpan_name}
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Module::Build) >= 0.400000
BuildRequires:  perl(Module::Util) >= 1.00
Requires:       perl(Module::Util) >= 1.00
Recommends:     perl(Test::Pod) >= 1.14
Recommends:     perl(Test::Pod::Coverage) >= 1.04

Sometimes you need to test what happens when a given module is not
installed. This module provides a way of temporarily hiding installed
modules from perl's require mechanism. The Module::Mask object adds itself
to @INC and blocks require calls to restricted modules.

Module::Mask will not affect modules already loaded at time of

%autosetup  -n %{cpan_name}-%{version}

perl Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}

./Build test

./Build install destdir=%{buildroot} create_packlist=0

%files -f %{name}.files
%doc Changes README

openSUSE Build Service is sponsored by