From 9ed2e396f47df8893619753e698affb0e4edb8c1 Mon Sep 17 00:00:00 2001 From: Arne Becker <101113822+EbiArnie@users.noreply.github.com> Date: Tue, 5 Mar 2024 19:43:39 +0000 Subject: [PATCH] perl-plack-middleware-deflater: new package (#43014) Adds Plack::Middleware::Deflater --- .../perl-plack-middleware-deflater/package.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 var/spack/repos/builtin/packages/perl-plack-middleware-deflater/package.py diff --git a/var/spack/repos/builtin/packages/perl-plack-middleware-deflater/package.py b/var/spack/repos/builtin/packages/perl-plack-middleware-deflater/package.py new file mode 100644 index 0000000000..de1c570e06 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl-plack-middleware-deflater/package.py @@ -0,0 +1,33 @@ +# 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 PerlPlackMiddlewareDeflater(PerlPackage): + """Compress response body with Gzip or Deflate""" + + homepage = "https://metacpan.org/pod/Plack::Middleware::Deflater" + url = ( + "https://cpan.metacpan.org/authors/id/K/KA/KAZEBURO/Plack-Middleware-Deflater-0.12.tar.gz" + ) + + maintainers("EbiArnie") + + license("Artistic-1.0-Perl OR GPL-1.0-or-later") + + version("0.12", sha256="28da95e7da4c8b5591ac454509c92176cd0842960ce074fde30f9a1075dcc275") + + depends_on("perl@5.8.1:", type=("build", "link", "run", "test")) + depends_on("perl-plack", type=("build", "run", "test")) + depends_on("perl-test-requires", type=("build", "link")) + + def test_use(self): + """Test 'use module'""" + options = ["-we", 'use strict; use Plack::Middleware::Deflater; print("OK\n")'] + + perl = self.spec["perl"].command + out = perl(*options, output=str.split, error=str.split) + assert "OK" in out