X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FApp%2FFatPacker.pm;h=453f3bcae631a88d585f46f1d0700135f08fed98;hb=ac04cb12844d59c4ea810a2413c0f657fb71299e;hp=439934181f0048b0ba673e5f5672977e945b0422;hpb=cc5db92a0bedaa07593dc91ef75babb9e1c2fb86;p=p5sagit%2FApp-FatPacker.git diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index 4399341..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.009003'; # 0.9.3 +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; } } @@ -171,7 +171,8 @@ sub script_command_file { unshift @INC, sub { if (my $fat = $fatpacked{$_[1]}) { - open my $fh, '<', \$fat; + open my $fh, '<', \$fat + or die "FatPacker error loading $_[1] (could be a perl installation issue?)"; return $fh; } return