]> git.vpit.fr Git - perl/modules/Acme-CPANAuthors-You-re_using.git/blobdiff - lib/Acme/CPANAuthors/You/re_using.pm
Guard against exceptions thrown by Module::Metadata
[perl/modules/Acme-CPANAuthors-You-re_using.git] / lib / Acme / CPANAuthors / You / re_using.pm
index efc35bf3e4eca354c30c8f5682924a2fab1b64a8..a2474bbb14eb4f3b2b308b7cc4e26e50dc586229 100644 (file)
@@ -14,13 +14,13 @@ Acme::CPANAuthors::You::re_using - We are the CPAN authors that have written the
 
 =head1 VERSION
 
-Version 0.04
+Version 0.06
 
 =cut
 
 our $VERSION;
 BEGIN {
- $VERSION = '0.04';
+ $VERSION = '0.06';
 }
 
 =head1 SYNOPSIS
@@ -65,7 +65,10 @@ sub register {
  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} = ();
   },
@@ -87,7 +90,7 @@ sub register {
 
   my $name;
   $name = $auth->name if defined $auth;
+
   $authors{$cpanid} = defined $name ? $name : $cpanid;
  }