in reply to corelist shows a non existent module Pod::Functions::Functions

Reported, a fix proposed.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
  • Comment on Re: corelist shows a non existent module Pod::Functions::Functions
  • Download Code

Replies are listed 'Best First'.
Re^2: corelist shows a non existent module ... (General Test)(updated)
by LanX (Saint) on Jul 25, 2022 at 02:56 UTC
    I couldn't sleep and was desperate enough to hack a test script checking my Strawberry portable for missing core modules and missing documentation...

    I'm stunned!

    (Edit: Not sure if it's a Strawberry issue, I mean there is not very often need for Amiga stuff on Win...)

    Update

    Oops, I should check if core list says if they're still installed...

    Update

    Fixed code by providing the current Version of Perl $]

    There are still modules missing but much less than before

    update
    This should be run on a linux system again.

    use v5.12; use warnings; use Data::Dump qw/pp dd/; use Module::CoreList; my $verbose = 0; my $limit = -20; $|=1; sub out { say @_ if $verbose >0; } my @missing; my @no_doc; my @list = Module::CoreList->find_modules( qr/./, $] ); my $pod_path; for my $module (@list) { out "--- checking $module"; $pod_path = qx/perldoc -l $module 2>&1/; if ($pod_path =~ /no documentation found/i) { chomp $pod_path; out " $pod_path"; unless (find_module($module)){ # explicit require to be sure it's not a filesystem issue my $require_module = qx/perl -m$module -e0 2>&1/; if ( $require_module =~ /can't locate/i ) { out " Couldn't require $module:"; push @missing, $module; } } else { push @no_doc, $module; } } last if $limit-- == 0; # short test } warn pp '\@missing: ', \@missing; warn pp '\@no_doc: ', \@no_doc; sub find_module { my ( $filename ) = @_ ; # --- snippet from perldoc -f require $filename =~ s~::~/~g; $filename .= ".pm"; for my $prefix (@INC) { my $realfilename = "$prefix/$filename"; next if ! -e $realfilename || -d _ || -b _; return 1; } out " Couldn't locate $filename in \@INC ..."; return; }

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery