perl-catalyst-component-instancepercontext: new package (#42962)

Adds Catalyst::Component::InstancePerContext
This commit is contained in:
Arne Becker 2024-03-04 18:56:08 +00:00 committed by GitHub
parent df92f0a7d4
commit 8714ea6652
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,30 @@
# 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 PerlCatalystComponentInstancepercontext(PerlPackage):
"""Moose role to create only one instance of component per context"""
homepage = "https://metacpan.org/pod/Catalyst::Component::InstancePerContext"
url = "https://cpan.metacpan.org/authors/id/G/GR/GRODITI/Catalyst-Component-InstancePerContext-0.001001.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("0.001001", sha256="7f63f930e1e613f15955c9e6d73873675c50c0a3bc2a61a034733361ed26d271")
depends_on("perl-catalyst-runtime", type=("build", "run", "test"))
depends_on("perl-moose", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Catalyst::Component::InstancePerContext; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out