Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi there monks,
I have a large pluggable application, with lots of modules that use Moose with roles. During some point in time, I would like to traverse all required modules and ask them if they do a certain role $module->does($role).
Does Moose or any of the Meta packages it uses (Class::MOP? Moose::Meta?) can generate a list of modules loaded in memory that implement a role?
Or, aside from Moose, what's the cleanest way to get a list of modules loaded? Is there a hot cpan package out there that does this? Or should I just traverse the ${::} hash? Googling didn't help.
Thanks! -miguel
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: find all modules that "do" a role
by Corion (Patriarch) on Sep 07, 2009 at 12:38 UTC | |
by Anonymous Monk on Sep 07, 2009 at 15:26 UTC | |
by Corion (Patriarch) on Sep 07, 2009 at 15:55 UTC | |
|
Re: find all modules that "do" a role
by stvn (Monsignor) on Sep 07, 2009 at 16:09 UTC |