From: Tyler Riddle Date: Thu, 18 Oct 2012 20:27:26 +0000 (-0700) Subject: make exclude list for unpacking work with filenames that have spaces; readability... X-Git-Tag: v0.003001_01~123 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc62b744f9483c55d0e5c5297525d2d30171e62c;p=scpubgit%2FObject-Remote.git make exclude list for unpacking work with filenames that have spaces; readability tweaks --- diff --git a/lib/Object/Remote/FatNode.pm b/lib/Object/Remote/FatNode.pm index 0d10bb9..bed8171 100644 --- a/lib/Object/Remote/FatNode.pm +++ b/lib/Object/Remote/FatNode.pm @@ -55,7 +55,8 @@ sub filter_not_core { ) } -my @before_inc = grep { filter_not_core() } keys %mods; +my @file_names = keys %mods; +my @before_inc = grep { filter_not_core() } @file_names; my @after_inc; my $start = stripspace <<'END_START'; @@ -66,7 +67,7 @@ my $start = stripspace <<'END_START'; my (%fatpacked,%fatpacked_extra); END_START -$start .= 'my %exclude = map { $_ => 1 } qw(' . join(' ', @exclude_mods) . ");\n"; +$start .= 'my %exclude = map { $_ => 1 } (\'' . join("','", @exclude_mods) . "');\n"; my $end = stripspace <<'END_END'; s/^ //mg for values %fatpacked, values %fatpacked_extra; @@ -78,7 +79,7 @@ my $end = stripspace <<'END_END'; return undef; } - warn "handling $_[1]"; + #warn "Handling $_[1]"; open my $fh, '<', \$fat; return $fh; }