77 lines
2.7 KiB
RPMSpec
77 lines
2.7 KiB
RPMSpec
#
|
|
# spec file for package perl-AutoLoader
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name AutoLoader
|
|
Name: perl-AutoLoader
|
|
Version: 5.74
|
|
Release: 0
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Load subroutines only on demand
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/S/SM/SMUELLER/%{cpan_name}-%{version}.tar.gz
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
%{perl_requires}
|
|
|
|
%description
|
|
The *AutoLoader* module works with the *AutoSplit* module and the '__END__'
|
|
token to defer the loading of some subroutines until they are used rather
|
|
than loading them all at once.
|
|
|
|
To use *AutoLoader*, the author of a module has to place the definitions of
|
|
subroutines to be autoloaded after an '__END__' token. (See perldata.) The
|
|
*AutoSplit* module can then be run manually to extract the definitions into
|
|
individual files _auto/funcname.al_.
|
|
|
|
*AutoLoader* implements an AUTOLOAD subroutine. When an undefined
|
|
subroutine in is called in a client module of *AutoLoader*, *AutoLoader*'s
|
|
AUTOLOAD subroutine attempts to locate the subroutine in a file with a name
|
|
related to the location of the file from which the client module was read.
|
|
As an example, if _POSIX.pm_ is located in _/usr/local/lib/perl5/POSIX.pm_,
|
|
*AutoLoader* will look for perl subroutines *POSIX* in
|
|
_/usr/local/lib/perl5/auto/POSIX/*.al_, where the '.al' file has the same
|
|
name as the subroutine, sans package. If such a file exists, AUTOLOAD will
|
|
read and evaluate it, thus (presumably) defining the needed subroutine.
|
|
AUTOLOAD will then 'goto' the newly defined subroutine.
|
|
|
|
Once this process completes for a given function, it is defined, so future
|
|
calls to the subroutine will bypass the AUTOLOAD mechanism.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{version}
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes README
|
|
%license Artistic Copying
|
|
|
|
%changelog
|