Exclude vendorarch and sitearch from FatNode and ModuleSender
[scpubgit/Object-Remote.git] / lib / Object / Remote / FatNode.pm
index 4f7d4e3..773b552 100644 (file)
@@ -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