diff --git a/var/spack/repos/builtin/packages/perl-http-parser-xs/package.py b/var/spack/repos/builtin/packages/perl-http-parser-xs/package.py new file mode 100644 index 0000000000..ce07f92c51 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-http-parser-xs/package.py @@ -0,0 +1,27 @@ +# 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 PerlHttpParserXs(PerlPackage): + """A fast, primitive HTTP request parser""" + + homepage = "https://metacpan.org/pod/HTTP::Parser::XS" + url = "https://cpan.metacpan.org/authors/id/K/KA/KAZUHO/HTTP-Parser-XS-0.17.tar.gz" + + maintainers("EbiArnie") + + license("Artistic-1.0-Perl OR GPL-1.0-or-later") + + version("0.17", sha256="794e6833e326b10d24369f9cdbfc1667105ef6591e8f41e561a3d41a7027a809") + + def test_use(self): + """Test 'use module'""" + options = ["-we", 'use strict; use HTTP::Parser::XS; print("OK\n")'] + + perl = self.spec["perl"].command + out = perl(*options, output=str.split, error=str.split) + assert "OK" in out diff --git a/var/spack/repos/builtin/packages/perl-starman/package.py b/var/spack/repos/builtin/packages/perl-starman/package.py new file mode 100644 index 0000000000..e5f7ddf11e --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-starman/package.py @@ -0,0 +1,39 @@ +# 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 PerlStarman(PerlPackage): + """High-performance preforking PSGI/Plack web server""" + + homepage = "https://metacpan.org/pod/Starman" + url = "https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Starman-0.4017.tar.gz" + + maintainers("EbiArnie") + + license("Artistic-1.0-Perl OR GPL-1.0-or-later") + + version("0.4017", sha256="6ffab915f323f60089e3ebf852b9b9707d6917266df8afd7370fac04bfdfee4e") + + depends_on("perl@5.8.1:", type=("build", "link", "run", "test")) + depends_on("perl-data-dump", type=("build", "run", "test")) + depends_on("perl-http-date", type=("build", "run", "test")) + depends_on("perl-http-message", type=("build", "run", "test")) + depends_on("perl-http-parser-xs", type=("build", "run", "test")) + depends_on("perl-libwww-perl", type=("build", "test")) + depends_on("perl-module-build-tiny@0.034:", type=("build")) + depends_on("perl-net-server@2.007:", type=("build", "run", "test")) + depends_on("perl-plack@0.9971:", type=("build", "run", "test")) + depends_on("perl-test-requires", type=("build", "test")) + depends_on("perl-test-tcp@2.00:", type=("build", "run", "test")) + + def test_use(self): + """Test 'use module'""" + options = ["-we", 'use strict; use Starman; print("OK\n")'] + + perl = self.spec["perl"].command + out = perl(*options, output=str.split, error=str.split) + assert "OK" in out