From: Christian Walde Date: Fri, 7 Sep 2012 12:03:16 +0000 (+0200) Subject: fix creation of %fatpacked hash X-Git-Tag: v0.009010~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cbd99f493bf60a856656f4d6b8658ced3f4aaeb1;p=p5sagit%2FApp-FatPacker.git fix creation of %fatpacked hash use/require expect @INC to contain unix style paths and as such %fatpacked needs to use unix paths as the keys for code, otherwise Fatpacker will be unable to find code that was fatpacked on a non-unix platform. --- diff --git a/Changes b/Changes index 87e2e1a..9e8921a 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ + - RT #79489: %fatpacked keys need to be unix paths + 0.009009 2012-08-03 - RT #78724: fix trace --to-stderr (ether) diff --git a/lib/App/FatPacker.pm b/lib/App/FatPacker.pm index 4ca7875..01aed5e 100644 --- a/lib/App/FatPacker.pm +++ b/lib/App/FatPacker.pm @@ -9,6 +9,7 @@ use File::Find qw(find); use File::Spec::Functions qw( catdir splitpath splitdir catpath rel2abs abs2rel ); +use File::Spec::Unix; use File::Copy qw(copy); use File::Path qw(mkpath rmtree); use B qw(perlstring); @@ -192,7 +193,7 @@ sub script_command_file { find(sub { return unless -f $_; !/\.pm$/ and warn "File ${File::Find::name} isn't a .pm file - can't pack this and if you hoped we were going to things may not be what you expected later\n" and return; - $files{abs2rel($File::Find::name,$dir)} = do { + $files{File::Spec::Unix->abs2rel($File::Find::name,$dir)} = do { local (@ARGV, $/) = ($File::Find::name); <> }; }, $dir); @@ -268,6 +269,8 @@ sawyer - Sawyer X (cpan:XSAWYERX) ether - Karen Etheridge (cpan:ETHER) +Mithaldu - Christian Walde (cpan:MITHALDU) + Many more people are probably owed thanks for ideas. Yet another doc nit to fix.