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;fp=lib%2FObject%2FRemote%2FFatNode.pm;h=8b143b8c13cb6bf2543745d5bbbf17d89f0545c0;hp=fe07f29f94d46dacb51bfe2e13075925291a2fa0;hb=e454581efc719427e401b14e94d520288bcabdcc;hpb=f8c4ed0e7389bfc911aa3c348ddd7cd69fb620ce diff --git a/lib/Object/Remote/FatNode.pm b/lib/Object/Remote/FatNode.pm index fe07f29..8b143b8 100644 --- a/lib/Object/Remote/FatNode.pm +++ b/lib/Object/Remote/FatNode.pm @@ -47,9 +47,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{$_});