Init package

This commit is contained in:
misaka00251 2022-07-15 22:36:07 +08:00
parent 2e8467ef37
commit f9b325a096
No known key found for this signature in database
GPG Key ID: 4AA100DC964EDE26
2 changed files with 76 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,76 @@
Name: perl-autovivification
Version: 0.18
Release: 1
Summary: Lexically disable autovivification
License: GPL+ or Artistic
URL: https://metacpan.org/release/autovivification
Source0: https://cpan.metacpan.org/authors/id/V/VP/VPIT/autovivification-%{version}.tar.gz
# Build
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: make
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(Config)
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Runtime
BuildRequires: perl(XSLoader)
# Tests only
BuildRequires: perl(Exporter)
BuildRequires: perl(File::Spec)
BuildRequires: perl(lib)
BuildRequires: perl(POSIX)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(Test::More)
BuildRequires: perl(threads)
BuildRequires: perl(threads::shared)
BuildRequires: perl(Time::HiRes)
# Runtime dependencies
Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
Requires: perl(XSLoader)
# Avoid provides from perl shared objects
%{?perl_default_filter}
%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
behavior is called autovivification and usually does what you mean (e.g.
when you store a value) but it's sometimes 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.
%prep
%setup -q -n autovivification-%{version}
%build
perl Makefile.PL \
INSTALLDIRS=vendor \
OPTIMIZE="%{optflags}" \
NO_PACKLIST=1 \
NO_PERLLOCAL=1
%{make_build}
%install
%{make_install}
find %{buildroot} -type f -name '*.bs' -empty -delete
%{_fixperms} -c %{buildroot}
%check
make test
%files
%doc Changes README
%{perl_vendorarch}/autovivification.pm
%{perl_vendorarch}/auto/autovivification/
%{_mandir}/man3/autovivification.3*
%changelog
* Wed Jun 29 2022 misaka00251 <misaka00251@misakanet.cn> - 0.18-1
- Init package (Thanks to fedora team)