X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FObject-Remote.git;a=blobdiff_plain;f=lib%2FObject%2FRemote%2FFatNode.pm;h=cafc47e6976d4831fa3cacb2a6049fa1848e41a8;hp=594f281a7178c9e6ce541e6d49e1aee36dfb5361;hb=6845582fdc45bc6623a7f79a8d80ef650c37a3e8;hpb=668343cde7e6339cca56c66a41defdd28327f224 diff --git a/lib/Object/Remote/FatNode.pm b/lib/Object/Remote/FatNode.pm index 594f281..cafc47e 100644 --- a/lib/Object/Remote/FatNode.pm +++ b/lib/Object/Remote/FatNode.pm @@ -37,7 +37,9 @@ my $command = qq( -mObject::Remote::Node -mMethod::Generate::BuildAll -mMethod::Generate::DemolishAll + -mMoo::HandleMoose::_TypeMap -mJSON::PP + -mDevel::GlobalDestruction -e 'print join "\\n", \%INC' ); @@ -46,9 +48,16 @@ $command =~ s/\n/ /g; chomp(my @inc = qx($command)); my %exclude = map { $_ => 1 } @exclude_mods; -my %mods = reverse @inc; + my %file_names = @inc; +# only include mods that match the filename, +# ie ones that will succeed with a require $module +# https://rt.cpan.org/Ticket/Display.html?id=100478 +my %mods = + map { $file_names{$_} => $_ } + grep { $file_names{$_} =~ /\Q$_\E$/ } keys %file_names; + foreach(keys(%mods)) { if ($exclude{ $mods{$_} }) { delete($mods{$_});