X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FAcme%2FCPANAuthors%2FYou%2Fre_using.pm;h=09db1de0a732b0b808c25896ddf16ffbdeee4ee3;hb=8fe77c5fa1b5d38d2b2eeafc1bdc9d6137de6158;hp=be110240c55530de2f71ec28c9f283d437a06c6b;hpb=577036e9dd07645d623c05b0412343e533f83441;p=perl%2Fmodules%2FAcme-CPANAuthors-You-re_using.git diff --git a/lib/Acme/CPANAuthors/You/re_using.pm b/lib/Acme/CPANAuthors/You/re_using.pm index be11024..09db1de 100644 --- a/lib/Acme/CPANAuthors/You/re_using.pm +++ b/lib/Acme/CPANAuthors/You/re_using.pm @@ -35,11 +35,15 @@ BEGIN { This module builds an L class by listing all the modules that are installed on the current C and then retrieving the name and the PAUSE id of their corresponding authors. -It may take some time to load since it has to get CPAN indexes at C time. +It may take some time to load since it has to search all the directory trees given by your C<@INC> for modules, but also to get and parse CPAN indexes. =cut +our $SKIP; + BEGIN { + return if $SKIP; + my %authors; my $pkgs = Acme::CPANAuthors::Utils::cpan_packages(); @@ -48,10 +52,12 @@ BEGIN { my $auths = Acme::CPANAuthors::Utils::cpan_authors(); croak 'Couldn\'t retrieve a valid Parse::CPAN::Authors object' unless $auths; - my $installed = ExtUtils::Installed->new; + my $installed = ExtUtils::Installed->new(extra_libs => \@INC); croak 'Couldn\'t create a valid ExtUtils::Installed object' unless $installed; - for ($installed->modules()) { + for ($installed->modules) { + next unless defined and $_ ne 'Perl'; + my $mod = $pkgs->package($_); next unless $mod;