1 package Acme::CPANAuthors::You::re_using;
9 use Acme::CPANAuthors::Utils;
13 Acme::CPANAuthors::You::re_using - We are the CPAN authors that have written the modules installed on your perl!
28 use Acme::CPANAuthors;
30 my $authors = Acme::CPANAuthors->new("You're_using");
31 print $authors->name($_) . " ($_)\n" for $authors->id;
35 This module builds an L<Acme::CPANAuthors> class by listing all the modules that are installed on the current C<perl> and then retrieving the name and the PAUSE id of their corresponding authors.
37 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.
43 Fetches and registers the names into L<Acme::CPANAuthors::Register>.
44 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.
48 BEGIN { require Acme::CPANAuthors::Register; }
57 my $pkgs = Acme::CPANAuthors::Utils::cpan_packages();
58 die 'Couldn\'t retrieve a valid Parse::CPAN::Packages object' unless $pkgs;
60 my $auths = Acme::CPANAuthors::Utils::cpan_authors();
61 die 'Couldn\'t retrieve a valid Parse::CPAN::Authors object' unless $auths;
67 return unless /\.pm$/;
68 my $mod = Module::Metadata->new_from_file($_);
70 @modules{grep $_, $mod->packages_inside} = ();
77 my $mod = $pkgs->package($_);
80 my $dist = $mod->distribution;
83 my $cpanid = $dist->cpanid;
84 next if not $cpanid or exists $authors{$cpanid};
86 my $auth = $auths->author($cpanid);
89 $name = $auth->name if defined $auth;
91 $authors{$cpanid} = defined $name ? $name : $cpanid;
94 Acme::CPANAuthors::Register->import(%authors);
101 L<File::Find>, L<Module::Metadata>, L<Acme::CPANAuthors>.
105 All others C<Acme::CPANAuthors::*> modules.
109 Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
111 You can contact me by mail or on C<irc.perl.org> (vincent).
115 Please report any bugs or feature requests to C<bug-acme-cpanauthors-you-re_using at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-CPANAuthors-You-re_using>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
119 You can find documentation for this module with the perldoc command.
121 perldoc Acme::CPANAuthors::You::re_using
123 =head1 COPYRIGHT & LICENSE
125 Copyright 2009,2010,2011,2013 Vincent Pit, all rights reserved.
127 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.