perl-class-accessor: New package (#41698)

* perl-class-accessor: New package

Adds Class::Accessor

* Removed copyright line

* New year
This commit is contained in:
Arne Becker 2024-01-10 23:46:09 +00:00 committed by GitHub
parent 2bd7a18cd7
commit 56bb329b07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,25 @@
# 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 PerlClassAccessor(PerlPackage):
"""Automated accessor generation"""
homepage = "https://metacpan.org/pod/Class::Accessor"
url = "https://cpan.metacpan.org/authors/id/K/KA/KASEI/Class-Accessor-0.51.tar.gz"
maintainers("EbiArnie")
version("0.51", sha256="bf12a3e5de5a2c6e8a447b364f4f5a050bf74624c56e315022ae7992ff2f411c")
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Class::Accessor; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out