!1 Init package

From: @misaka00251 
Reviewed-by: @wangyangdahai 
Signed-off-by: @wangyangdahai
This commit is contained in:
openeuler-ci-bot 2022-08-16 02:29:46 +00:00 committed by Gitee
commit bb28b6ad0e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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)