summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/perl-mime-types/package.py
blob: 997d7a4d311d21d54ce567988d7c07dc6e7be3bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
# Copyright 2023 EMBL-European Bioinformatics Institute
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack.package import *


class PerlMimeTypes(PerlPackage):
    """Definition of MIME types"""

    homepage = "https://metacpan.org/pod/MIME::Types"
    url = "https://cpan.metacpan.org/authors/id/M/MA/MARKOV/MIME-Types-2.24.tar.gz"

    maintainers("EbiArnie")

    license("GPL-1.0-or-later OR Artistic-1.0-Perl")

    version("2.24", sha256="629e361f22b220be50c2da7354e23c0451757709a03c25a22f3160edb94cb65f")

    def test_use(self):
        """Test 'use module'"""
        options = ["-we", 'use strict; use MIME::Types; print("OK\n")']

        perl = self.spec["perl"].command
        out = perl(*options, output=str.split, error=str.split)
        assert "OK" in out