Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: Accessing list of package names in a module

by FreakyGreenLeaky (Sexton)
on Nov 20, 2008 at 10:22 UTC ( #724834=note: print w/ replies, xml ) Need Help??


in reply to Re: Accessing list of package names in a module
in thread Accessing list of package names in a module

Thanks, Module::Info looked ideal, but it doesn't correctly return all the package names from a module (it only returns the last for some reason).

I'll give the first sample a try now.


Comment on Re^2: Accessing list of package names in a module
Re^3: Accessing list of package names in a module
by Anonymous Monk on Nov 21, 2008 at 03:24 UTC
    You should report that bug.
      Here is demo for bug
      #!/usr/bin/perl -- package New; $New::VERSION=0; 1; package New::Shhine; $New::Shhine::VERSION=0; 1; package New'Guy'S; $New::Guy::S=0; 1; package New::Grandpa; $New::Grandpa::VERSION=0; 1; package THESE::DON'T::SHOW::UP; package New::Because::There::Is::No::True::Return::Value; package Its::A::Bug; package main; unless( caller ){ # important for package_versions, otherwise fork bom +b use Module::Info; my $mi = Module::Info->new_from_file( __FILE__ ); my @pi = $mi->packages_inside; print $_, $/ for @pi; print "\n----\n"; my %pv = $mi->package_versions; print $_, $/ for %pi; } __END__

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2015-07-04 19:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls