=head1 VERSION
-Version 0.01
+Version 0.02
=cut
our $VERSION;
BEGIN {
- $VERSION = '0.01';
+ $VERSION = '0.02';
}
=head1 SYNOPSIS
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.
+=head1 FUNCTIONS
+
+=head2 C<register>
+
+Fetches and registers the names into L<Acme::CPANAuthors::Register>.
+This function is automatically called when you C<use> this module, unless you have set the package variable C<$Acme::CPANAuthors::You're_using::SKIP> to true beforehand.
+
=cut
-our $SKIP;
+BEGIN { require Acme::CPANAuthors::Register; }
-BEGIN {
- return if $SKIP;
+sub register {
+ return if shift;
my %authors;
my $auths = Acme::CPANAuthors::Utils::cpan_authors();
croak 'Couldn\'t retrieve a valid Parse::CPAN::Authors object' unless $auths;
- my $installed = ExtUtils::Installed->new(extra_libs => \@INC);
+ my $installed = ExtUtils::Installed->new();
croak 'Couldn\'t create a valid ExtUtils::Installed object' unless $installed;
for ($installed->modules) {
$authors{$cpanid} = defined $name ? $name : $cpanid;
}
- require Acme::CPANAuthors::Register;
Acme::CPANAuthors::Register->import(%authors);
}
+our $SKIP;
+
+BEGIN { register($SKIP) }
+
=head1 DEPENDENCIES
L<Carp>, L<ExtUtils::Installed>, L<Acme::CPANAuthors>.
=head1 COPYRIGHT & LICENSE
-Copyright 2009 Vincent Pit, all rights reserved.
+Copyright 2009,2010 Vincent Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.