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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |