commit 596ff5de496e4245dc128d71a472d64772de1c2d Author: Iain Arnell <iarnell@xxxxxxxxx> Date: Tue Aug 16 17:08:51 2011 +0200 initial import (rhbz#730037) .gitignore | 1 + perl-autovivification.spec | 59 ++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 61 insertions(+), 0 deletions(-) --- diff --git a/.gitignore b/.gitignore index e69de29..3cde297 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/autovivification-0.09.tar.gz diff --git a/perl-autovivification.spec b/perl-autovivification.spec new file mode 100644 index 0000000..8ab6e61 --- /dev/null +++ b/perl-autovivification.spec @@ -0,0 +1,59 @@ +Name: perl-autovivification +Version: 0.09 +Release: 1%{?dist} +Summary: Lexically disable autovivification +License: GPL+ or Artistic +Group: Development/Libraries +URL: http://search.cpan.org/dist/autovivification/ +Source0: http://search.cpan.org/CPAN/authors/id/V/VP/VPIT/autovivification-%{version}.tar.gz +BuildRequires: perl >= 0:5.008003 +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(Test::Kwalitee) +BuildRequires: perl(Test::More) +BuildRequires: perl(Test::Pod) +BuildRequires: perl(Test::Pod::Coverage) +BuildRequires: perl(Test::Portability::Files) +BuildRequires: perl(XSLoader) +Requires: perl(XSLoader) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%{?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}" +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=%{buildroot} + +find %{buildroot} -type f -name .packlist -exec rm -f {} \; +find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \; +find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; + +%{_fixperms} %{buildroot}/* + +%check +make test + +%files +%doc Changes README +%{perl_vendorarch}/auto/* +%{perl_vendorarch}/autovivification* +%{_mandir}/man3/* + +%changelog +* Thu Aug 11 2011 Iain Arnell <iarnell@xxxxxxxxx> 0.09-1 +- Specfile autogenerated by cpanspec 1.78. diff --git a/sources b/sources index e69de29..745f7bb 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +ef96ee3912ec2d47938b2dcb55e96b4b autovivification-0.09.tar.gz -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list perl-devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/perl-devel