perl-catalyst-view-json: new package (#42981)

Adds Catalyst::View::JSON
This commit is contained in:
Arne Becker 2024-03-05 20:04:38 +00:00 committed by GitHub
parent 24ddc49c1b
commit 9ea9ee05c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,31 @@
# 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 PerlCatalystViewJson(PerlPackage):
"""JSON view for your data"""
homepage = "https://metacpan.org/pod/Catalyst::View::JSON"
url = "https://cpan.metacpan.org/authors/id/H/HA/HAARG/Catalyst-View-JSON-0.37.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("0.37", sha256="c5da3f6e8a77b1c99855de37d58802c0b194e29a7d86c60ed3831cfdd59f9dec")
depends_on("perl-catalyst-runtime", type=("build", "run", "test"))
depends_on("perl-json-maybexs@1.003000:", type=("build", "run", "test"))
depends_on("perl-mro-compat", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Catalyst::View::JSON; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out