Fix FTBFS with latest File::Path
Fixed incorrect error argument for File::Path functions (mkpath and remove_tree) (GH#144)
This commit is contained in:
parent
8ae8b81207
commit
0b3015d089
24
Path-Tiny-0.070-GH144.patch
Normal file
24
Path-Tiny-0.070-GH144.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/lib/Path/Tiny.pm b/lib/Path/Tiny.pm
|
||||
index aa194be..a0ee46f 100644
|
||||
--- a/lib/Path/Tiny.pm
|
||||
+++ b/lib/Path/Tiny.pm
|
||||
@@ -1112,7 +1112,7 @@ sub mkpath {
|
||||
my ( $self, $args ) = @_;
|
||||
$args = {} unless ref $args eq 'HASH';
|
||||
my $err;
|
||||
- $args->{err} = \$err unless defined $args->{err};
|
||||
+ $args->{error} = \$err unless defined $args->{error};
|
||||
require File::Path;
|
||||
my @dirs = File::Path::make_path( $self->[PATH], $args );
|
||||
if ( $err && @$err ) {
|
||||
@@ -1369,8 +1369,8 @@ sub remove_tree {
|
||||
return 0 if !-e $self->[PATH] && !-l $self->[PATH];
|
||||
$args = {} unless ref $args eq 'HASH';
|
||||
my $err;
|
||||
- $args->{err} = \$err unless defined $args->{err};
|
||||
- $args->{safe} = 1 unless defined $args->{safe};
|
||||
+ $args->{error} = \$err unless defined $args->{error};
|
||||
+ $args->{safe} = 1 unless defined $args->{safe};
|
||||
require File::Path;
|
||||
my $count = File::Path::remove_tree( $self->[PATH], $args );
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
Name: perl-Path-Tiny
|
||||
Version: 0.070
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: File path utility
|
||||
Group: Development/Libraries
|
||||
License: ASL 2.0
|
||||
URL: http://search.cpan.org/dist/Path-Tiny/
|
||||
Source0: http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/Path-Tiny-%{version}.tar.gz
|
||||
Patch0: Path-Tiny-0.070-GH144.patch
|
||||
BuildArch: noarch
|
||||
# Module Build
|
||||
BuildRequires: coreutils
|
||||
@ -85,6 +86,9 @@ CRLF translation.
|
||||
%prep
|
||||
%setup -q -n Path-Tiny-%{version}
|
||||
|
||||
# Fixed incorrect error argument for File::Path functions (mkpath and remove_tree)
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
perl Makefile.PL INSTALLDIRS=vendor
|
||||
make %{?_smp_mflags}
|
||||
@ -104,6 +108,10 @@ make test
|
||||
%{_mandir}/man3/Path::Tiny.3*
|
||||
|
||||
%changelog
|
||||
* Mon Jul 20 2015 Paul Howarth <paul@city-fan.org> - 0.070-2
|
||||
- Fixed incorrect error argument for File::Path functions (mkpath and
|
||||
remove_tree) (GH#144)
|
||||
|
||||
* Mon Jun 29 2015 Paul Howarth <paul@city-fan.org> - 0.070-1
|
||||
- Update to 0.070
|
||||
- The 'copy' method now returns the object for the copied file
|
||||
|
||||
Loading…
Reference in New Issue
Block a user