Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: LWP vs ExtUtils::Installed vs libwww::perl vs Module::Metadata

by Anonymous Monk
on Sep 23, 2018 at 10:12 UTC ( #1222887=note: print w/replies, xml ) Need Help??


in reply to Re: LWP vs ExtUtils::Installed vs libwww::perl vs Module::Metadata
in thread LWP vs ExtUtils::Installed vs libwww::perl vs Module::Metadata

> You haven't said if/why you need this?

I'm analyzing Perl and have discovered 4 distributions out of about 1000 CPAN installations where ExtUtils::Installed and Module::Metadata don't agree:

1. LWP (or libwww::perl) 1222878
2. MIDI (or MIDI-Perl) 1222886
3. Astro (Namespace appears as a module to ExtUtils::Installed->modules())
4. Role::Identifiable (doesn't really exist)


perl -MExtUtils::Installed -le 'print join "\n", grep /astro/i, ExtUtils::Installed->modules()'

Astro
Astro::Constants
Astro::Coord::ECI
Astro::Coords
Astro::FITS::Header
Astro::MapProjection
Astro::MoonPhase
Astro::PAL
Astro::Sunrise
Astro::Telescope
Astro::Time::HJD
Astro::Units
Astro::WaveBand
DateTime::Astro

perl -MExtUtils::Installed -le 'print join "\n", ExtUtils::Installed->files("Astro")'

/perl-5.26.2/lib/site_perl/5.26.2/Astro/Coord.pm
/perl-5.26.2/lib/site_perl/5.26.2/Astro/Misc.pm
/perl-5.26.2/man/man3/Astro::Time.3
/perl-5.26.2/lib/site_perl/5.26.2/Astro/Time.pm
/perl-5.26.2/man/man3/Astro::Coord.3
/perl-5.26.2/man/man3/Astro::Misc.3

perl -MModule::Metadata -MData::Dumper -le 'print(Dumper(Module::Metadata->new_from_module("Astro")))'

$VAR1 = undef;

Finally:

perl -MExtUtils::Installed -le 'print join "\n", grep /identifiable/i, ExtUtils::Installed->modules()'

Role::Identifiable

perl -MExtUtils::Installed -le 'print join "\n", ExtUtils::Installed->files("Role::Identifiable")'

/perl-5.26.2/man/man3/Role::Identifiable::HasIdent.3
/perl-5.26.2/lib/site_perl/5.26.2/Role/Identifiable/HasTags.pm
/perl-5.26.2/lib/site_perl/5.26.2/Role/Identifiable/HasIdent.pm
/perl-5.26.2/man/man3/Role::Identifiable::HasTags.3

perl -MModule::Metadata -MData::Dumper -le 'print(Dumper(Module::Metadata->new_from_module("Role::Identifiable")))'

$VAR1 = undef;

  • Comment on Re^2: LWP vs ExtUtils::Installed vs libwww::perl vs Module::Metadata

Replies are listed 'Best First'.
Re^3: LWP vs ExtUtils::Installed vs libwww::perl vs Module::Metadata
by haukex (Bishop) on Sep 24, 2018 at 07:55 UTC
    I'm analyzing Perl

    Could you be more specific? Are you hunting bugs in ExtUtils::Installed? Because that's what this issue feels like to me at the moment, although I still don't have enough time to investigate in detail.*

    If you're not hunting bugs, perhaps you could explain what exactly you've analyzing and why, then we could probably suggest more fitting tools. If I guess you might be trying to figure out which modules are installed and which files belong to which distributions, then why not just use one reliable tool (maybe that's Module::Metadata?) instead of trying two?

    You also haven't said if you need to figure out distribution names as well; in this node there appears to still be a mixup of distribution names (MIDI-Perl) with actual modules (MIDI/MIDI.pm).

    * Update: See my post here, looks like a bug to me.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1222887]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2020-10-20 18:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (210 votes). Check out past polls.

    Notices?