Acme-CPANAuthors-You-re_using

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.07    2015-03-13 15:30 UTC
        + Fix : [RT #91248] : Does not handle missing modules or missing
                versions
                Exceptions thrown by Module::Metadata are now ignored.
                Thanks Karen Etheridge for reporting.

0.06    2013-08-21 17:20 UTC
        This is a maintenance release. The code contains no functional change.
        Satisfied users of version 0.05 can skip this update.
        + Tst : Author tests are no longer bundled with this distribution.
                They are only made available to authors in the git repository.

0.05    2013-08-20 19:15 UTC
        This is a maintenance release. The code contains no functional change.
        Satisfied users of version 0.04 can skip this update.
        + Tst : The Kwalitee test has been removed.

0.04    2011-08-24 23:10 UTC
        + Chg : The module now uses File::Find and Module::Metadata to collect
                all the modules installed in your system.
                ExtUtils::Installed is no longer needed.
        + Chg : die() is called instead of croak() for internal errors.
                Carp is no longer needed.
        + Fix : Update the Parse::CPAN::Packages' author id test, since
                Acme::CPANAuthors does not depend on it anymore.
        + Upd : Acme::CPANAuthors dependency bumped to 0.16.

0.03    2010-01-03 10:10 UTC
        + Fix : Stop skipping t/10-base.t when Acme::CPANAuthors throw an
                unrelated warning.
        + Fix : Explicitely depend on the last ExtUtils::Installed and
                Acme::CPANAuthors.
        + Fix : Work around Kwalitee test misfailures.

MANIFEST  view on Meta::CPAN

Changes
MANIFEST
META.json
META.yml
Makefile.PL
README
lib/Acme/CPANAuthors/You/re_using.pm
samples/list_authors
t/00-load.t
t/10-base.t
t/11-naughty-version.t
t/lib/Acme/CPANAuthors/You/re_using/TestNaughtyVersion.pm

META.json  view on Meta::CPAN

{
   "abstract" : "We are the CPAN authors that have written the modules installed on your perl!",
   "author" : [
      "Vincent Pit <perl@profvince.com>"
   ],
   "dynamic_config" : 0,
   "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.150001",
   "license" : [
      "perl_5"
   ],
   "meta-spec" : {
      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
      "version" : "2"

META.yml  view on Meta::CPAN

---
abstract: 'We are the CPAN authors that have written the modules installed on your perl!'
author:
  - 'Vincent Pit <perl@profvince.com>'
build_requires:
  Acme::CPANAuthors: '0.16'
  ExtUtils::MakeMaker: '0'
  File::Find: '0'
  Module::Metadata: '1.000017'
  Test::More: '0'
  lib: '0'
configure_requires:
  ExtUtils::MakeMaker: '0'

README  view on Meta::CPAN

NAME
    Acme::CPANAuthors::You::re_using - We are the CPAN authors that have
    written the modules installed on your perl!

VERSION
    Version 0.08

SYNOPSIS
        use Acme::CPANAuthors;

        my $authors = Acme::CPANAuthors->new("You're_using");
        print $authors->name($_) . " ($_)\n" for $authors->id;

DESCRIPTION
    This module builds an Acme::CPANAuthors class by listing all the modules
    that are installed on the current "perl" and then retrieving the name
    and the PAUSE id of their corresponding authors.

    It may take some time to load since it has to search all the directory
    trees given by your @INC for modules, but also to get and parse CPAN
    indexes.

FUNCTIONS
  "register"
    Fetches and registers the names into Acme::CPANAuthors::Register. This
    function is automatically called when you "use" this module, unless you
    have set the package variable $Acme::CPANAuthors::You're_using::SKIP to

README  view on Meta::CPAN

SEE ALSO
    All others "Acme::CPANAuthors::*" modules.

AUTHOR
    Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.

    You can contact me by mail or on "irc.perl.org" (vincent).

BUGS
    Please report any bugs or feature requests to
    "bug-acme-cpanauthors-you-re_using at rt.cpan.org", or through the web
    interface at
    <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.

SUPPORT
    You can find documentation for this module with the perldoc command.

        perldoc Acme::CPANAuthors::You::re_using

lib/Acme/CPANAuthors/You/re_using.pm  view on Meta::CPAN

use strict;
use warnings;

use File::Find ();
use Module::Metadata;

use Acme::CPANAuthors::Utils;

=head1 NAME

Acme::CPANAuthors::You::re_using - We are the CPAN authors that have written the modules installed on your perl!

=head1 VERSION

Version 0.08

=cut

our $VERSION;
BEGIN {
 $VERSION = '0.08';
}

=head1 SYNOPSIS

    use Acme::CPANAuthors;

    my $authors = Acme::CPANAuthors->new("You're_using");
    print $authors->name($_) . " ($_)\n" for $authors->id;

=head1 DESCRIPTION

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.

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

BEGIN { require Acme::CPANAuthors::Register; }

our $SKIP;

sub register {
 return if $SKIP;

 my %authors;

 my $pkgs = Acme::CPANAuthors::Utils::cpan_packages();
 die 'Couldn\'t retrieve a valid Parse::CPAN::Packages object' unless $pkgs;

 my $auths = Acme::CPANAuthors::Utils::cpan_authors();
 die 'Couldn\'t retrieve a valid Parse::CPAN::Authors object' unless $auths;

 my %modules;

 File::Find::find({
  wanted => sub {
   return unless /\.pm$/;
   my $mod = do {
    local $@;
    eval { Module::Metadata->new_from_file($_) }
   };

lib/Acme/CPANAuthors/You/re_using.pm  view on Meta::CPAN

 }, @INC);

 for (keys %modules) {
  my $mod = $pkgs->package($_);
  next unless $mod;

  my $dist = $mod->distribution;
  next unless $dist;

  my $cpanid = $dist->cpanid;
  next if not $cpanid or exists $authors{$cpanid};

  my $auth = $auths->author($cpanid);

  my $name;
  $name = $auth->name if defined $auth;

  $authors{$cpanid} = defined $name ? $name : $cpanid;
 }

 Acme::CPANAuthors::Register->import(%authors);
}

BEGIN { register() }

=head1 DEPENDENCIES

L<File::Find> (core since perl 5)

L<Acme::CPANAuthors> 0.16.

lib/Acme/CPANAuthors/You/re_using.pm  view on Meta::CPAN

All others C<Acme::CPANAuthors::*> modules.

=head1 AUTHOR

Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.

You can contact me by mail or on C<irc.perl.org> (vincent).

=head1 BUGS

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 a...

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Acme::CPANAuthors::You::re_using

=head1 COPYRIGHT & LICENSE

Copyright 2009,2010,2011,2013,2015 Vincent Pit, all rights reserved.

samples/list_authors  view on Meta::CPAN

#!perl

use strict;
use warnings;

use Acme::CPANAuthors;

my $authors = Acme::CPANAuthors->new("You're_using");
print $authors->name($_) . " ($_)\n" for $authors->id;

t/10-base.t  view on Meta::CPAN


use Test::More;

use Acme::CPANAuthors;

local @INC = grep $_ ne '.', @INC;

diag 'Directories in @INC :';
diag "  $_" for @INC;

my $authors = eval {
 local $SIG{__WARN__} = sub {
  my ($msg) = @_;
  if ($msg =~ /^You're_using CPAN Authors are not registered yet: (.*)/s) {
   die $1;
  }
  diag $_ for @_;
 };
 Acme::CPANAuthors->new("You're_using");
};

if ($authors) {
 plan tests => 5;
} else {
 plan skip_all => $@;
}

my $count = $authors->count;
diag "$count authors found";
cmp_ok $count, '>', 0, 'there are some authors';

is   $authors->name('???'),      undef,         'wrong name';
is   $authors->name('VPIT'),     'Vincent Pit', 'we should at least have this module';
isnt $authors->name('ISHIGAKI'), undef,         'we should at least have Acme::CPANAuthors\' author';
isnt $authors->name('GAAS'),     undef,         'we should at least have LWP\'s author';



( run in 0.866 second using v1.01-cache-2.11-cpan-5c0b1e786e0 )