summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Becker <101113822+EbiArnie@users.noreply.github.com>2024-02-28 22:25:34 +0000
committerGitHub <noreply@github.com>2024-02-28 14:25:34 -0800
commit0339690a59721221ba9acefee00eaff33bd1d58e (patch)
treee96f912dc414785239098181a56d67b89a4913c8
parent2bae1b7e003f30279db169b9b791b5a34e9fa764 (diff)
downloadspack-0339690a59721221ba9acefee00eaff33bd1d58e.tar.gz
spack-0339690a59721221ba9acefee00eaff33bd1d58e.tar.bz2
spack-0339690a59721221ba9acefee00eaff33bd1d58e.tar.xz
spack-0339690a59721221ba9acefee00eaff33bd1d58e.zip
perl-test-json, perl-json-any: New packages (#42896)
* perl-test-json: New package Adds Test::JSON * Adds perl-json-any
-rw-r--r--var/spack/repos/builtin/packages/perl-json-any/package.py33
-rw-r--r--var/spack/repos/builtin/packages/perl-test-json/package.py30
2 files changed, 63 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl-json-any/package.py b/var/spack/repos/builtin/packages/perl-json-any/package.py
new file mode 100644
index 0000000000..84bf6658b5
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-json-any/package.py
@@ -0,0 +1,33 @@
+# 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 PerlJsonAny(PerlPackage):
+ """(DEPRECATED) Wrapper Class for the various JSON classes"""
+
+ homepage = "https://metacpan.org/pod/JSON::Any"
+ url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/JSON-Any-1.40.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("1.40", sha256="083256255a48094fd9ac1239e0fea8a10a2383a9cd1ef4b1c7264ede1b4400ab")
+
+ depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
+ depends_on("perl-test-fatal", type=("build", "test"))
+ depends_on("perl-test-needs", type=("build", "test"))
+ depends_on("perl-test-warnings@0.009:", type=("build", "test"))
+ depends_on("perl-test-without-module", type=("build", "test"))
+
+ def test_use(self):
+ """Test 'use module'"""
+ options = ["-we", 'use strict; use JSON::Any; print("OK\n")']
+
+ perl = self.spec["perl"].command
+ out = perl(*options, output=str.split, error=str.split)
+ assert "OK" in out
diff --git a/var/spack/repos/builtin/packages/perl-test-json/package.py b/var/spack/repos/builtin/packages/perl-test-json/package.py
new file mode 100644
index 0000000000..b3c079e4b0
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-json/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 PerlTestJson(PerlPackage):
+ """Test JSON data"""
+
+ homepage = "https://metacpan.org/pod/Test::JSON"
+ url = "https://cpan.metacpan.org/authors/id/O/OV/OVID/Test-JSON-0.11.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.11", sha256="07c08ab2fcc12850d1ad54fcf6afe9ad1a25a098310c3e7142af1d3cb821d7b3")
+
+ depends_on("perl-json-any@1.2:", type=("build", "run", "test"))
+ depends_on("perl-test-differences@0.47:", type=("build", "run", "test"))
+
+ def test_use(self):
+ """Test 'use module'"""
+ options = ["-we", 'use strict; use Test::JSON; print("OK\n")']
+
+ perl = self.spec["perl"].command
+ out = perl(*options, output=str.split, error=str.split)
+ assert "OK" in out