iterate over the use-d modules

[email protected] (Luca Ferrari)
Newsgroups perl.beginners
Message-ID <CAKoxK+40P3bfVaj6o+DizdU2mkKc4NhjH+2MEawYx7PbKhDKAA@mail.gmail.com>
Hi all,
is there a way to iterate over the used modules, I mean every symbol
loaded with use?
I would like to do something like:

use Foo;
use Bar;

say ${ $_ }::VERSION for ( @used );

and get something like

say $Foo::VERSION;
say $Bar::VERSION;


Thanks,
Luca
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.