From: Matt S Trout Date: Wed, 25 Jul 2012 17:06:19 +0000 (+0000) Subject: Exclude vendorarch and sitearch from FatNode and ModuleSender X-Git-Tag: v0.002003~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df8e0ca6a336fb37fd14d40fa345e787bc75b8c2;p=scpubgit%2FObject-Remote.git Exclude vendorarch and sitearch from FatNode and ModuleSender --- diff --git a/Changes b/Changes index 53c498b..6386621 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,4 @@ + - Exclude vendorarch and sitearch from FatNode and ModuleSender - Increase default timeout to 10 seconds - Add Class::C3 as a dependency since it's required for 5.8 remote nodes - SSH options as a separate argument for the SSH connector diff --git a/lib/Object/Remote/FatNode.pm b/lib/Object/Remote/FatNode.pm index 4f7d4e3..773b552 100644 --- a/lib/Object/Remote/FatNode.pm +++ b/lib/Object/Remote/FatNode.pm @@ -31,16 +31,21 @@ my $command = qq( -mMethod::Generate::BuildAll -mMethod::Generate::DemolishAll -mJSON::PP - -e 'print join "\\n", reverse \%INC' + -e 'print join "\\n", \%INC' ); $command =~ s/\n/ /g; -chomp(my %mods = qx($command)); +chomp(my @inc = qx($command)); + +my %mods = reverse @inc; my @non_core_non_arch = grep +( - not (/^\Q$Config{privlibexp}/ or /^\Q$Config{archlibexp}/) -), grep !/\Q$Config{archname}/, grep !/\W$Config{myarchname}/, keys %mods; + not ( + /^\Q$Config{privlibexp}/ or /^\Q$Config{archlibexp}/ + or /^\Q$Config{vendorarchexp}/ or /^\Q$Config{sitearchexp}/ + ) +), grep !/\Q$Config{archname}/, grep !/\Q$Config{myarchname}/, keys %mods; my $start = stripspace <<'END_START'; # This chunk of stuff was generated by Object::Remote::FatNode. To find diff --git a/lib/Object/Remote/ModuleSender.pm b/lib/Object/Remote/ModuleSender.pm index 0129b88..f33a1d5 100644 --- a/lib/Object/Remote/ModuleSender.pm +++ b/lib/Object/Remote/ModuleSender.pm @@ -8,8 +8,10 @@ use Moo; has dir_list => (is => 'lazy'); sub _build_dir_list { - my %core = map +($_ => 1), @Config{qw(privlibexp archlibexp)}; - [ grep !/$Config{archname}$/, grep !$core{$_}, @INC ]; + my %core = map +($_ => 1), grep $_, @Config{ + qw(privlibexp archlibexp vendorarchexp sitearchexp) + }; + [ grep !/\Q$Config{archname}/, grep !/\Q$Config{myarchname}/, grep !$core{$_}, @INC ]; } sub source_for {