perl-list-compare: new package (#43018)

Adds List::Compare
This commit is contained in:
Arne Becker 2024-03-05 19:39:05 +00:00 committed by GitHub
parent 4d89eeca9b
commit 58b394bcec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,29 @@
# 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 PerlListCompare(PerlPackage):
"""Compare elements of two or more lists"""
homepage = "https://metacpan.org/pod/List::Compare"
url = "https://cpan.metacpan.org/authors/id/J/JK/JKEENAN/List-Compare-0.55.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("0.55", sha256="cc719479836579d52b02bc328ed80a98f679df043a99b5710ab2c191669eb837")
depends_on("perl-capture-tiny", type=("build", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use List::Compare; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out