diff --git a/var/spack/repos/builtin/packages/perl-string-approx/package.py b/var/spack/repos/builtin/packages/perl-string-approx/package.py new file mode 100644 index 0000000000..bdc23394f4 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-string-approx/package.py @@ -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