perl-mojolicious: new package (#42899)

Adds Mojolicious
This commit is contained in:
Arne Becker 2024-02-28 22:16:36 +00:00 committed by GitHub
parent 1f3aefb0a3
commit 7e00bd5014
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,29 @@
# 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 PerlMojolicious(PerlPackage):
"""Real-time web framework"""
homepage = "https://metacpan.org/pod/Mojolicious"
url = "https://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-9.35.tar.gz"
maintainers("EbiArnie")
license("Artistic-2.0")
version("9.35", sha256="6a4a446ee07fca7c6db72f5d817540d6833009cb8de7cce4c6fb24a15ee7d46b")
depends_on("perl@5.16.0:", type=("build", "link", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Mojolicious; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out