diff options
author | Arne Becker <101113822+EbiArnie@users.noreply.github.com> | 2023-12-28 10:34:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-28 11:34:08 +0100 |
commit | 987a63ed944c740de4d47a0032f8539f61a64088 (patch) | |
tree | 23df15830209b19fe74afc05b079518cdae4ac5a | |
parent | ade544b4cc8f5e3cb1873d8a5ccb94ddcc47b265 (diff) | |
download | spack-987a63ed944c740de4d47a0032f8539f61a64088.tar.gz spack-987a63ed944c740de4d47a0032f8539f61a64088.tar.bz2 spack-987a63ed944c740de4d47a0032f8539f61a64088.tar.xz spack-987a63ed944c740de4d47a0032f8539f61a64088.zip |
perl-json-maybexs: add new package (#41703)
-rw-r--r-- | var/spack/repos/builtin/packages/perl-json-maybexs/package.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl-json-maybexs/package.py b/var/spack/repos/builtin/packages/perl-json-maybexs/package.py new file mode 100644 index 0000000000..e0bd8b2699 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-json-maybexs/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2023 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 PerlJsonMaybexs(PerlPackage): + """Use Cpanel::JSON::XS with a fallback to JSON::XS and JSON::PP""" + + homepage = "https://metacpan.org/pod/JSON::MaybeXS" + url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/JSON-MaybeXS-1.004005.tar.gz" + + maintainers("EbiArnie") + + version("1.004005", sha256="f5b6bc19f579e66b7299f8748b8ac3e171936dc4e7fcb72a8a257a9bd482a331") + + depends_on("perl@5.6.0:", type=("build", "link", "run", "test")) + depends_on("perl-cpanel-json-xs@2.3310:", type=("build", "run", "test")) + depends_on("perl-test-needs@0.002006:", type=("build", "test")) + + def test_use(self): + """Test 'use module'""" + options = ["-we", 'use strict; use JSON::MaybeXS; print("OK\n")'] + + perl = self.spec["perl"].command + out = perl(*options, output=str.split, error=str.split) + assert "OK" in out |