代码拉取完成,页面将自动刷新
Name: perl-lib-relative
Version: 1.002
Release: 3
Summary: Add paths relative to the current file to @INC
License: Artistic 2.0
Group: Development/Libraries
URL: http://search.cpan.org/dist/lib-relative/
Source0: http://www.cpan.org/authors/id/D/DB/DBOOK/lib-relative-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl >= 0:5.006001
BuildRequires: perl-generators
BuildRequires: perl(Cwd)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Spec)
BuildRequires: perl(File::Temp) >= 0.19
BuildRequires: perl(Test::More) >= 0.88
%description
Adding a path to @INC to load modules from a local directory may seem
simple, but has a few common pitfalls to be aware of. Directly adding a
relative path to @INC means that any later code that changes the current
working directory will change where modules are loaded from. This applies
to the . path that used to be in @INC by default until perl 5.26.0, or a
relative path added in code like use lib 'path/to/lib', and may be a
vulnerability if such a location is not supposed to be writable.
Additionally, the commonly used FindBin module relies on interpreter state
and the path to the original script invoked by the perl interpreter,
sometimes requiring workarounds in uncommon cases like generated or
embedded code. This module proposes a more straightforward method: take a
path relative to the current file, absolutize it, and add it to @INC.
%package help
Summary : Add paths relative to the current file to @INC
Provides: perl-lib-relative-doc
%description help
Adding a path to @INC to load modules from a local directory may seem
simple, but has a few common pitfalls to be aware of. Directly adding a
relative path to @INC means that any later code that changes the current
working directory will change where modules are loaded from. This applies
to the . path that used to be in @INC by default until perl 5.26.0, or a
relative path added in code like use lib 'path/to/lib', and may be a
vulnerability if such a location is not supposed to be writable.
Additionally, the commonly used FindBin module relies on interpreter state
and the path to the original script invoked by the perl interpreter,
sometimes requiring workarounds in uncommon cases like generated or
embedded code. This module proposes a more straightforward method: take a
path relative to the current file, absolutize it, and add it to @INC.
%prep
%setup -q -n lib-relative-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%make_build
%install
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
%{_fixperms} $RPM_BUILD_ROOT/*
%check
make test
%files
%license LICENSE META.json
%doc Changes CONTRIBUTING.md README
%{perl_vendorlib}/*
%files help
%{_mandir}/man?/*
%changelog
* Fri Aug 01 2025 Funda Wang <fundawang@yeah.net> - 1.002-3
- use perl-generators to scan META.json for requirements
* Fri Feb 07 2025 sqfu <dev01203@linx-info.com> - 1.002-2
- drop useless perl(:MODULE_COMPAT) requirement
* Wed Feb 07 2024 woody2918 <wudi1@uniontech.com> - 1.002-1
- Update version to 1.002
- Skip symlink tests on msys as symlinks are broken on this platform
- Fix checking whether symlinks are available for testing on Win32 and msys
* Tue Jul 13 2021 Perl_Bot <Perl_Bot@openeuler.org> - 1.000-1
- Specfile autogenerated by Perl_Bot
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。