From 3ee6fc937eee2eae519736ce50718b41f095e084 Mon Sep 17 00:00:00 2001 From: Arne Becker <101113822+EbiArnie@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:42:48 +0000 Subject: [PATCH] perl-data-predicate: new package (#43015) * perl-data-predicate: new package Adds Data::Predicate * Added description --- .../packages/perl-data-predicate/package.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/perl-data-predicate/package.py diff --git a/var/spack/repos/builtin/packages/perl-data-predicate/package.py b/var/spack/repos/builtin/packages/perl-data-predicate/package.py new file mode 100644 index 0000000000..93df54b290 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-data-predicate/package.py @@ -0,0 +1,28 @@ +# 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 PerlDataPredicate(PerlPackage): + """Predicate objects for Perl. A predicate object is an object that encapsulates conditions.""" + + homepage = "https://metacpan.org/pod/Data::Predicate" + url = "https://cpan.metacpan.org/authors/id/A/AY/AYATES/data/Data-Predicate-2.1.1.tar.gz" + + maintainers("EbiArnie") + + version("2.1.1", sha256="26d40a54dd3ba3409e847562ef2564a5598bfb3f81c7bd784b608d9bf2222173") + + depends_on("perl-test-exception", type=("build", "test")) + depends_on("perl-readonly", type=("build", "run", "test")) + + def test_use(self): + """Test 'use module'""" + options = ["-we", 'use strict; use Data::Predicate; print("OK\n")'] + + perl = self.spec["perl"].command + out = perl(*options, output=str.split, error=str.split) + assert "OK" in out