From: David Leadbeater Date: Tue, 18 Jan 2011 19:49:35 +0000 (+0000) Subject: Switch to File::Path::{rmtree,mkpath} X-Git-Tag: v0.9.6~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d5603b7352d697c5ed276286fba7238957894e9;p=p5sagit%2FApp-FatPacker.git Switch to File::Path::{rmtree,mkpath} Removes dependency on File::Path >= 2.07. --- diff --git a/Changes b/Changes index 4c5d06e..dd69e5e 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,7 @@ +0.9.6 2011-01-18 + - Use File::Path's "legacy" mkpath and rmtree functions. No longer needs + File::Path >= 2.07. + 0.9.5 2011-01-12 - Avoid using done_testing so this works on older systems diff --git a/Makefile.PL b/Makefile.PL index f63558a..e0dfa26 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,8 +4,6 @@ use inc::Module::Install 0.93; all_from('lib/App/FatPacker.pm'); -requires 'File::Path' => 2.07; # required for make_path/remove_tree - install_script('bin/fatpack'); WriteAll; diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index 90100e7..453f3bc 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -10,10 +10,10 @@ use File::Spec::Functions qw( catdir splitpath splitdir catpath rel2abs abs2rel ); use File::Copy qw(copy); -use File::Path qw(make_path remove_tree); +use File::Path qw(mkpath rmtree); use B qw(perlstring); -our $VERSION = '0.009005'; # 0.9.5 +our $VERSION = '0.009006'; # 0.9.6 $VERSION = eval $VERSION; @@ -119,8 +119,8 @@ sub script_command_tree { sub packlists_to_tree { my ($self, $where, $packlists) = @_; - remove_tree $where; - make_path $where; + rmtree $where; + mkpath $where; foreach my $pl (@$packlists) { my ($vol, $dirs, $file) = splitpath $pl; my @dir_parts = splitdir $dirs; @@ -139,7 +139,7 @@ sub packlists_to_tree { next unless substr($source,0,length $pack_base) eq $pack_base; my $target = rel2abs( abs2rel($source, $pack_base), $where ); my $target_dir = catpath((splitpath $target)[0,1]); - make_path $target_dir; + mkpath $target_dir; copy $source => $target; } }