diff --git a/autovivification-0.18.tar.gz b/autovivification-0.18.tar.gz new file mode 100644 index 0000000..f7f9ca5 Binary files /dev/null and b/autovivification-0.18.tar.gz differ diff --git a/perl-autovivification.spec b/perl-autovivification.spec new file mode 100644 index 0000000..9ad9cb7 --- /dev/null +++ b/perl-autovivification.spec @@ -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 - 0.18-1 +- Init package (Thanks to fedora team)