summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/perl-params-validationcompiler/package.py
blob: 00f562ef2424a0dfc394fc30d83908b636a2c49a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# 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 PerlParamsValidationcompiler(PerlPackage):
    """Params::ValidationCompiler - Build an optimized subroutine parameter validator once,
    use it forever"""

    homepage = "https://metacpan.org/pod/Params::ValidationCompiler"
    url = "https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/Params-ValidationCompiler-0.31.tar.gz"

    maintainers("EbiArnie")

    license("Artistic-2.0")

    version("0.31", sha256="7b6497173f1b6adb29f5d51d8cf9ec36d2f1219412b4b2410e9d77a901e84a6d")

    depends_on("perl-eval-closure", type=("build", "run", "test"))
    depends_on("perl-exception-class", type=("build", "run", "test"))
    depends_on("perl-specio@0.14:", type=("build", "test"))
    depends_on("perl-test-without-module", type=("build", "test"))
    depends_on("perl-test2-plugin-nowarnings", type=("build", "test"))
    depends_on("perl-test2-suite", type=("build", "test"))

    def test_use(self):
        """Test 'use module'"""
        options = ["-we", 'use strict; use Params::ValidationCompiler; print("OK\n")']

        perl = self.spec["perl"].command
        out = perl(*options, output=str.split, error=str.split)
        assert "OK" in out