Hi Lotus1,

I am not a CPAN expert, but based on what I've seen I'm not sure if there is necessarily a relationship between the name of the CPAN package and the modules contained within. Take for example LWP: it's in  libwww-perl. The only two things I can think of at the moment are to scan the lib/ subdirectory within the .tar.gz, but that might not be perfectly reliable, or to look at http://www.cpan.org/modules/02packages.details.txt (gzipped) to figure out which modules are in which packages. Both don't "feel" particularly clean, so since it's Friday evening it's very possible there's something better I'm missing ;-) (Update: Yep, see Corion's post)

Update: I briefly checked on how CPAN tests for whether a module is installed or not, and from what I can tell it simply scans @INC for the file (using the usual pattern that Foo::Bar::Quz becomes Foo/Bar/Quz.pm).

Regards,
-- Hauke D


In reply to Re: find module name from the module archive by haukex
in thread find module name from the module archive by Lotus1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.