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
|
# Copyright 2013-2023 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 PerlNamespaceAutoclean(PerlPackage):
"""Namespace::Autoclean - Keep imports out of your namespace"""
homepage = "https://metacpan.org/pod/namespace::autoclean"
url = "https://cpan.metacpan.org/authors/id/E/ET/ETHER/namespace-autoclean-0.29.tar.gz"
maintainers("EbiArnie")
version("0.29", sha256="45ebd8e64a54a86f88d8e01ae55212967c8aa8fed57e814085def7608ac65804")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
depends_on("perl-b-hooks-endofscope@0.12:", type=("build", "run", "test"))
depends_on("perl-namespace-clean@0.20:", type=("build", "run", "test"))
depends_on("perl-sub-identify", type=("build", "run", "test"))
depends_on("perl-test-needs", type=("build", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use namespace::autoclean; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out
|