perl-string-approx: new package (#43023)

Adds String::Approx
This commit is contained in:
Arne Becker 2024-03-05 19:35:04 +00:00 committed by GitHub
parent f061dcda74
commit bfc71e9dae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,25 @@
# 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 PerlStringApprox(PerlPackage):
"""Perl extension for approximate matching (fuzzy matching)"""
homepage = "https://metacpan.org/pod/String::Approx"
url = "https://cpan.metacpan.org/authors/id/J/JH/JHI/String-Approx-3.28.tar.gz"
maintainers("EbiArnie")
version("3.28", sha256="43201e762d8699cb0ac2c0764a5454bdc2306c0771014d6c8fba821480631342")
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use String::Approx; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out