2011-09-30 07:22:48 +00:00
|
|
|
|
#
|
|
|
|
|
# spec file for package perl-File-Path-Tiny
|
|
|
|
|
#
|
2025-02-05 16:13:59 +00:00
|
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2011-09-30 07:22:48 +00:00
|
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2021-02-06 13:49:59 +00:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-09-30 07:22:48 +00:00
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2021-02-06 13:49:59 +00:00
|
|
|
|
%define cpan_name File-Path-Tiny
|
2011-09-30 07:22:48 +00:00
|
|
|
|
Name: perl-File-Path-Tiny
|
2025-02-05 16:13:59 +00:00
|
|
|
|
Version: 1.0.0
|
2011-09-30 07:22:48 +00:00
|
|
|
|
Release: 0
|
2025-02-05 16:13:59 +00:00
|
|
|
|
# 1.0 -> normalize -> 1.0.0
|
|
|
|
|
%define cpan_version 1.0
|
2021-02-06 13:49:59 +00:00
|
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
2025-02-05 16:13:59 +00:00
|
|
|
|
Summary: Recursive versions of mkdir() and rmdir() without as much overhead as Fi[cut]
|
2021-02-06 13:49:59 +00:00
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2025-02-05 16:13:59 +00:00
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/D/DM/DMUEY/%{cpan_name}-%{cpan_version}.tar.gz
|
2016-01-28 21:12:40 +00:00
|
|
|
|
Source1: cpanspec.yml
|
2025-08-12 18:14:08 +02:00
|
|
|
|
Source100: README.md
|
2012-02-13 12:19:14 +00:00
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: perl
|
2012-02-13 11:13:27 +00:00
|
|
|
|
BuildRequires: perl-macros
|
2018-02-08 06:05:33 +00:00
|
|
|
|
BuildRequires: perl(Test::Exception)
|
|
|
|
|
Requires: perl(Test::Exception)
|
2025-02-05 16:13:59 +00:00
|
|
|
|
Provides: perl(File::Path::Tiny) = %{version}
|
|
|
|
|
%undefine __perllib_provides
|
2012-02-13 12:19:14 +00:00
|
|
|
|
%{perl_requires}
|
2011-09-30 07:22:48 +00:00
|
|
|
|
|
|
|
|
|
%description
|
2016-01-28 21:12:40 +00:00
|
|
|
|
The goal here is simply to provide recursive versions of mkdir() and
|
|
|
|
|
rmdir() with as little code and overhead as possible.
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
2016-01-28 21:12:40 +00:00
|
|
|
|
This module is in no way meant to derogate File::Path and is in no way an
|
|
|
|
|
endorsement to go out and replace all use of File::Path with
|
|
|
|
|
File::Path::Tiny.
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
2016-01-28 21:12:40 +00:00
|
|
|
|
File::Path is very good at what it does but there's simply a lot happening
|
|
|
|
|
that we can do without much of the time.
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
2016-01-28 21:12:40 +00:00
|
|
|
|
Here are some things File::Path has/does that this module attempts to do
|
|
|
|
|
without:
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
|
|
|
|
* * multiple interfaces
|
|
|
|
|
|
2016-01-28 21:12:40 +00:00
|
|
|
|
Backwards compatibility brings in a lot of code and logic that we don't
|
|
|
|
|
need from here on out.
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
2013-10-04 15:40:10 +00:00
|
|
|
|
* * chdir()s
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
2018-02-08 06:05:33 +00:00
|
|
|
|
It forces a ton of chdir()s which could leave you somewhere you're not
|
2016-01-28 21:12:40 +00:00
|
|
|
|
planning on being and requires much more overhead to do.
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
2018-02-08 06:05:33 +00:00
|
|
|
|
This module provides a way to disable that if you know it is safe to do so
|
|
|
|
|
in your circumstance.
|
|
|
|
|
|
2012-02-13 12:19:14 +00:00
|
|
|
|
* * can croak not allowing you to detect and handle failure
|
|
|
|
|
|
2016-01-28 21:12:40 +00:00
|
|
|
|
Just let me handle errors how I want. Don't make my entire app die or have
|
|
|
|
|
to wrap it in an eval
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
2018-02-08 06:05:33 +00:00
|
|
|
|
The exception here is the security checks can croak, which is what you
|
|
|
|
|
want. See DIAGNOSTICS for more info.
|
|
|
|
|
|
2012-02-13 12:19:14 +00:00
|
|
|
|
* * A well intentioned output system
|
|
|
|
|
|
2016-01-28 21:12:40 +00:00
|
|
|
|
Just let me do the output how I want. (Nothing, As HTML, print to a
|
|
|
|
|
filehandle, etc...)
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
|
|
|
|
* * A well intentioned and experimental (IE subject to change) error
|
|
|
|
|
handling system.
|
|
|
|
|
|
2016-01-28 21:12:40 +00:00
|
|
|
|
Just keep it simple and detect failure via a boolean check and do what I
|
|
|
|
|
want with the error. See "How can I make/remove multiple paths?"
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
|
|
|
|
* * According to its POD, removing a tree is apparently not safe unless you
|
2013-10-04 15:40:10 +00:00
|
|
|
|
tell it to be with the ‘safe’ or 'keep_root' attributes.
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
2016-01-28 21:12:40 +00:00
|
|
|
|
Seems like that should just happen, I don't want to worry about
|
|
|
|
|
accidentally removing / when I pass it /tmp
|
2011-09-30 07:22:48 +00:00
|
|
|
|
|
|
|
|
|
%prep
|
2025-02-05 16:13:59 +00:00
|
|
|
|
%autosetup -n %{cpan_name}-%{cpan_version} -p1
|
2011-09-30 07:22:48 +00:00
|
|
|
|
|
|
|
|
|
%build
|
2021-02-06 13:49:59 +00:00
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
|
%make_build
|
2012-02-13 12:19:14 +00:00
|
|
|
|
|
|
|
|
|
%check
|
2021-02-06 13:49:59 +00:00
|
|
|
|
make test
|
2011-09-30 07:22:48 +00:00
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%perl_make_install
|
|
|
|
|
%perl_process_packlist
|
2012-02-13 12:19:14 +00:00
|
|
|
|
%perl_gen_filelist
|
2011-09-30 07:22:48 +00:00
|
|
|
|
|
2012-02-13 12:19:14 +00:00
|
|
|
|
%files -f %{name}.files
|
2011-09-30 07:22:48 +00:00
|
|
|
|
%doc Changes README
|
|
|
|
|
|
|
|
|
|
%changelog
|