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

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; }

-*- mode: compilation; default-directory: "c:/tmp/pm/" -*- Compilation started at Mon Jul 25 11:13:26 C:/nonBKU/strawberry-perl-5.32.1.1-64bit-portable/perl/bin\perl.exe -w + c:/tmp/pm/t_corelist.pl ( "\\\@missing: ", [ "Amiga::ARexx", "Amiga::Exec", "ExtUtils::XSSymSet", "IPC::Msg", "IPC::Semaphore", "IPC::SharedMem", "IPC::SysV", "Moped::Msg", "OS2::DLL", "OS2::ExtAttr", "OS2::PrfDB", "OS2::Process", "OS2::REXX", "Pod::Functions::Functions", "VMS::DCLsym", "VMS::Filespec", "VMS::Stdio", "Win32API::File::inc::ExtUtils::Myconst2perl", "XS::APItest", "XS::Typemap", ], ) at c:/tmp/pm/t_corelist.pl line 47. ( "\\\@no_doc: ", [ "Archive::Tar::Constant", "CPAN::Author", "CPAN::Bundle", "CPAN::CacheMgr", "CPAN::Complete", "CPAN::DeferredCode", "CPAN::Distribution", "CPAN::Distrostatus", "CPAN::Exception::RecursiveDependency", "CPAN::Exception::blocked_urllist", "CPAN::Exception::yaml_not_installed", "CPAN::Exception::yaml_process_error", "CPAN::FTP", "CPAN::FTP::netrc", "CPAN::HTTP::Client", "CPAN::HTTP::Credentials", "CPAN::Index", "CPAN::InfoObj", "CPAN::LWP::UserAgent", "CPAN::Module", "CPAN::Prompt", "CPAN::Shell", "CPAN::URL", "Carp::Heavy", "Encode::MIME::Header::ISO_2022_JP", "ExtUtils::CBuilder::Base", "ExtUtils::CBuilder::Platform::Unix", "ExtUtils::CBuilder::Platform::VMS", "ExtUtils::CBuilder::Platform::Windows::BCC", "ExtUtils::CBuilder::Platform::Windows::GCC", "ExtUtils::CBuilder::Platform::Windows::MSVC", "ExtUtils::CBuilder::Platform::aix", "ExtUtils::CBuilder::Platform::android", "ExtUtils::CBuilder::Platform::cygwin", "ExtUtils::CBuilder::Platform::darwin", "ExtUtils::CBuilder::Platform::dec_osf", "ExtUtils::CBuilder::Platform::os2", "ExtUtils::Constant::ProxySubs", "ExtUtils::Liblist::Kid", "ExtUtils::MakeMaker::version", "ExtUtils::MakeMaker::version::regex", "ExtUtils::ParseXS::CountLines", "IO::Compress::Adapter::Bzip2", "IO::Compress::Adapter::Deflate", "IO::Compress::Adapter::Identity", "IO::Compress::Base::Common", "IO::Compress::Gzip::Constants", "IO::Compress::Zip::Constants", "IO::Compress::Zlib::Constants", "IO::Compress::Zlib::Extra", "IO::Uncompress::Adapter::Bunzip2", "IO::Uncompress::Adapter::Identity", "IO::Uncompress::Adapter::Inflate", "Math::BigFloat::Trace", "Math::BigInt::Trace", "Net::FTP::A", "Net::FTP::E", "Net::FTP::I", "Net::FTP::L", "Pod::Simple::BlackBox", "Pod::Simple::HTMLLegacy", "Pod::Simple::Progress", "Pod::Simple::TiedOutFH", "Pod::Simple::Transcode", "Pod::Simple::TranscodeDumb", "Pod::Simple::TranscodeSmart", "Test::Tester::Delegate", "_charnames", "meta_notation", "overload::numbers", "unicore::Name", "version::regex", ], ) at c:/tmp/pm/t_corelist.pl line 48. Compilation finished at Mon Jul 25 11:15:46

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