Exclude vendorarch and sitearch from FatNode and ModuleSender
[scpubgit/Object-Remote.git] / lib / Object / Remote / FatNode.pm
index 9f94ee2..773b552 100644 (file)
@@ -22,22 +22,30 @@ my $command = qq(
   -mObject::Remote
   -mObject::Remote::Connector::STDIO
   -mCPS::Future
+  -mMRO::Compat
   -mClass::C3
+  -mClass::C3::next
+  -mAlgorithm::C3
   -mObject::Remote::ModuleLoader
   -mObject::Remote::Node
   -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
@@ -54,6 +62,8 @@ my $end = stripspace <<'END_END';
       open my $fh, '<', \$fat;
       return $fh;
     }
+    #Uncomment this to find brokenness
+    #warn "Missing $_[1]";
     return
   };