%define upstream_name autouse %define upstream_version 1.06 Name: perl-%{upstream_name} Version: %perl_convert_version %{upstream_version} Release: %mkrel 2 Summary: Postpone load of modules until a function is used License: GPL+ or Artistic Group: Development/Perl Url: http://search.cpan.org/dist/%{upstream_name} Source0: http://www.cpan.org/modules/by-module//%{upstream_name}-%{upstream_version}.tar.gz BuildRequires: perl(Carp) BuildRequires: perl(Errno) BuildRequires: perl(Exporter) BuildArch: noarch Provides: perl(autouse) %description If the module 'Module' is already loaded, then the declaration use autouse 'Module' => qw(func1 func2($;$)); is equivalent to use Module qw(func1 func2); If the module Module is not loaded yet, then the above declaration declares functions func1() and func2() in the current package. When these functions are called, they load the package Module if needed, and substitute themselves with the correct definitions. %prep %setup -q -n %{upstream_name}-%{upstream_version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor %make %check %make test %install rm -rf %buildroot %makeinstall_std %files %doc README Changes LICENSE META.yml META.json %{_mandir}/man3/* %perl_vendorlib/* %changelog * Sun Jan 13 2013 umeabot <umeabot> 1.60.0-2.mga3 + Revision: 375368 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Jul 19 2011 jquelin <jquelin> 1.60.0-1.mga2 + Revision: 126652 - imported package perl-autouse