Files
haikuports/dev-perl/class_tiny/class_tiny-1.008.recipe
2025-12-25 13:54:44 +01:00

63 lines
1.7 KiB
Bash

SUMMARY="Minimalist class construction"
DESCRIPTION="This module offers a minimalist class construction kit in around 120 lines of code. \
Here is a list of features:
- defines attributes via import arguments
- generates read-write accessors
- supports lazy attribute defaults
- supports custom accessors
- superclass provides a standard new constructor
- new takes a hash reference or list of key/value pairs
- new supports providing BUILDARGS to customize constructor options
- new calls BUILD for each class from parent to child
- superclass provides a DESTROY method
- DESTROY calls DEMOLISH for each class from child to parent
Multiple-inheritance is possible, with superclass order determined via mro::get_linear_isa.
It uses no non-core modules for any recent Perl. On Perls older than v5.10 it requires \
MRO::Compat. On Perls older than v5.14, it requires Devel::GlobalDestruction."
HOMEPAGE="https://metacpan.org/pod/Class::Tiny"
COPYRIGHT="2013 by David Golden"
LICENSE="Apache v2"
REVISION="2"
SOURCE_URI="https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/Class-Tiny-$portVersion.tar.gz"
CHECKSUM_SHA256="ee058a63912fa1fcb9a72498f56ca421a2056dc7f9f4b67837446d6421815615"
SOURCE_DIR="Class-Tiny-$portVersion"
ARCHITECTURES="any"
PROVIDES="
class_tiny = $portVersion
"
REQUIRES="
haiku
vendor_perl
"
BUILD_REQUIRES="
haiku_devel
"
BUILD_PREREQUIRES="
cmd:make
cmd:perl
"
BUILD()
{
perl Makefile.PL PREFIX=$prefix
make
}
INSTALL()
{
make pure_install
# remove architecture-specific files
cd $prefix
rm -r $(perl -V:vendorarch | cut -d\' -f2 | cut -d/ -f5-)
# cut extracts the quoted string and strips the prefix (which is perl's and not ours)
}
TEST()
{
make test
}