summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/perl-specio/package.py
blob: 3a50251d9973fdc5cb2f896d460b11c2b5a0dca5 (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
36
37
38
# 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 PerlSpecio(PerlPackage):
    """Type constraints and coercions for Perl ."""

    homepage = "https://metacpan.org/dist/Specio"
    url = "http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Specio-0.48.tar.gz"

    maintainers("EbiArnie")

    license("Artistic-2.0")

    version("0.48", sha256="0c85793580f1274ef08173079131d101f77b22accea7afa8255202f0811682b2")

    depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
    depends_on("perl-devel-stacktrace", type=("build", "run", "test"))
    depends_on("perl-eval-closure", type=("build", "run", "test"))
    depends_on("perl-module-runtime", type=("build", "run", "test"))
    depends_on("perl-mro-compat", type=("build", "run", "test"))
    depends_on("perl-role-tiny@1.003003:", type=("build", "run", "test"))
    depends_on("perl-sub-quote", type=("build", "run", "test"))
    depends_on("perl-test-fatal", type=("build", "run", "test"))
    depends_on("perl-test-needs", type=("build", "test"))
    depends_on("perl-try-tiny", type=("build", "run", "test"))

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

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