From 7bcb0fff7d73d452c493bf47addf1e2ab1f93f05 Mon Sep 17 00:00:00 2001 From: Arne Becker <101113822+EbiArnie@users.noreply.github.com> Date: Tue, 5 Mar 2024 20:02:06 +0000 Subject: [PATCH] perl-config-inifiles: new package (#42984) Adds Config::IniFiles --- .../packages/perl-config-inifiles/package.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/perl-config-inifiles/package.py diff --git a/var/spack/repos/builtin/packages/perl-config-inifiles/package.py b/var/spack/repos/builtin/packages/perl-config-inifiles/package.py new file mode 100644 index 0000000000..44e5237b7b --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-config-inifiles/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class PerlConfigInifiles(PerlPackage): + """A module for reading .ini-style configuration files.""" + + homepage = "https://metacpan.org/pod/Config::IniFiles" + url = "https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/Config-IniFiles-3.000003.tar.gz" + + maintainers("EbiArnie") + + license("Artistic-1.0-Perl OR GPL-1.0-or-later") + + version("3.000003", sha256="3c457b65d98e5ff40bdb9cf814b0d5983eb0c53fb8696bda3ba035ad2acd6802") + + depends_on("perl@5.8.0:", type=("build", "link", "run", "test")) + depends_on("perl-io-stringy", type=("build", "run", "test")) + + def test_use(self): + """Test 'use module'""" + options = ["-we", 'use strict; use Config::IniFiles; print("OK\n")'] + + perl = self.spec["perl"].command + out = perl(*options, output=str.split, error=str.split) + assert "OK" in out