X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FAcme%2FCPANAuthors%2FYou%2Fre_using.pm;h=9e2d4f541bf80f2e3d1a2cf12b59997178758d90;hb=7192b02eddf20367310ae6de59267858efbc9d4d;hp=8c8a746578eeb3ef3e234b819ff469618c899858;hpb=12c26b568cf70d8f9f8285efe03d7caf264161d2;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 8c8a746..9e2d4f5 100644 --- a/lib/Acme/CPANAuthors/You/re_using.pm +++ b/lib/Acme/CPANAuthors/You/re_using.pm @@ -3,8 +3,6 @@ package Acme::CPANAuthors::You::re_using; use strict; use warnings; -use Carp qw/croak/; - use File::Find (); use Module::Metadata; @@ -16,13 +14,13 @@ Acme::CPANAuthors::You::re_using - We are the CPAN authors that have written the =head1 VERSION -Version 0.03 +Version 0.08 =cut our $VERSION; BEGIN { - $VERSION = '0.03'; + $VERSION = '0.08'; } =head1 SYNOPSIS @@ -57,17 +55,20 @@ sub register { my %authors; my $pkgs = Acme::CPANAuthors::Utils::cpan_packages(); - croak 'Couldn\'t retrieve a valid Parse::CPAN::Packages object' unless $pkgs; + die 'Couldn\'t retrieve a valid Parse::CPAN::Packages object' unless $pkgs; my $auths = Acme::CPANAuthors::Utils::cpan_authors(); - croak 'Couldn\'t retrieve a valid Parse::CPAN::Authors object' unless $auths; + die 'Couldn\'t retrieve a valid Parse::CPAN::Authors object' unless $auths; my %modules; File::Find::find({ wanted => sub { return unless /\.pm$/; - my $mod = Module::Metadata->new_from_file($_); + my $mod = do { + local $@; + eval { Module::Metadata->new_from_file($_) } + }; return unless $mod; @modules{grep $_, $mod->packages_inside} = (); }, @@ -89,7 +90,7 @@ sub register { my $name; $name = $auth->name if defined $auth; - + $authors{$cpanid} = defined $name ? $name : $cpanid; } @@ -100,7 +101,11 @@ BEGIN { register() } =head1 DEPENDENCIES -L, L, L, L. +L (core since perl 5) + +L 0.16. + +L 1.000_017. =head1 SEE ALSO @@ -124,7 +129,7 @@ You can find documentation for this module with the perldoc command. =head1 COPYRIGHT & LICENSE -Copyright 2009,2010,2011 Vincent Pit, all rights reserved. +Copyright 2009,2010,2011,2013,2015 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.