perl-data-predicate: new package (#43015)

* perl-data-predicate: new package
Adds Data::Predicate
* Added description
This commit is contained in:
Arne Becker 2024-03-05 19:42:48 +00:00 committed by GitHub
parent c9b6cc9a58
commit 3ee6fc937e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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