Преглед изворни кода

utils/scancpan: warn when a module is a perl core module

we don't want create new BR package with perl core module,
because core modules are already included in perl distribution,
and built with the BR package perl.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Francois Perrad пре 5 година
родитељ
комит
5bff3945af
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      utils/scancpan

+ 3 - 0
utils/scancpan

@@ -611,6 +611,9 @@ sub fetch {
     unless ($dist{$name} && !$top) {
         say qq{fetch ${name}} unless $quiet;
         my $result = $mcpan->release( distribution => $name );
+        my $main_module = $result->{main_module};
+        push @info, qq{[$name] $main_module is a core module}
+            if $top && Module::CoreList::is_core( $main_module, undef, $] );
         $dist{$name} = $result;
         $license_files{$name} = {};
         eval {