autovivification: new perl module recipe

This commit is contained in:
Joachim Mairböck
2024-11-30 21:12:42 +01:00
parent 0a65a26bd0
commit d783046bba

View File

@@ -0,0 +1,57 @@
SUMMARY="Lexically disable autovivification"
DESCRIPTION="When an undefined variable is dereferenced, it gets silently upgraded to an array or \
hash reference (depending of the type of the dereferencing). This behaviour is called \
autovivification and usually does what you mean (e.g. when you store a value) but it may be \
unnatural or surprising because your variables gets populated behind your back. This is \
especially true when several levels of dereferencing are involved, in which case all levels are \
vivified up to the last, or when it happens in intuitively read-only constructs like exists.
This pragma lets you disable autovivification for some constructs and optionally throws a warning \
or an error when it would have happened."
HOMEPAGE="https://metacpan.org/pod/autovivification"
COPYRIGHT="2009,2010,2011,2012,2013,2014,2015,2017 Vincent Pit"
LICENSE="Artistic"
REVISION="1"
SOURCE_URI="https://cpan.metacpan.org/authors/id/V/VP/VPIT/autovivification-$portVersion.tar.gz"
CHECKSUM_SHA256="2d99975685242980d0a9904f639144c059d6ece15899efde4acb742d3253f105"
SOURCE_DIR="autovivification-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
autovivification$secondaryArchSuffix = $portVersion
"
if [ -n "$secondaryArchSuffix" ]; then
PROVIDES+="
autovivification = $portVersion
"
fi
REQUIRES="
haiku$secondaryArchSuffix
vendor_perl
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:perl
"
BUILD()
{
perl Makefile.PL PREFIX=$prefix
make
}
INSTALL()
{
make pure_install
}
TEST()
{
make test
}