File perl-CPAN-AutoINC.spec of Package perl-CPAN-AutoINC
#
# spec file for package perl-CPAN-AutoINC
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: perl-CPAN-AutoINC
Version: 0.01
Release: 0
%define cpan_name CPAN-AutoINC
Summary: Download and install CPAN modules upon first use
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/CPAN-AutoINC/
Source0: http://www.cpan.org/authors/id/D/DO/DONS/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
%{perl_requires}
%description
CPAN::AutoINC is a slightly useful tool designed to streamline the process
of installing all of the modules required by a script. By loading the
CPAN::AutoINC module (usually via a "-MCPAN::AutoINC" command-line option),
the user is registering a handler that will catch any attempt to use a
module that does not exist on the local machine. In this case, the
CPAN::Shell module will be invoked to search for the specified module and,
if found, an attempt will be made to install the module. If successful, the
module will be loaded and execution will continue as normal.
For example:
perl -MCPAN::AutoINC -MLingua::Num2Word=cardinal -le 'print cardinal("en",
42)'
...will download and install Lingua::Num2Word and Lingua::EN::Num2Word.
perl -MCPAN::AutoINC -MLingua::Num2Word=cardinal -le 'print cardinal("de",
42)'
...will then download and install Lingua::DE::Num2Word (German).
perl -MCPAN::AutoINC -MLingua::Num2Word=cardinal -le 'print cardinal("es",
42)'
...will then download and install Lingua::ES::Numeros (Spanish).
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README
%changelog