@INC contains all locations modules can be loaded from.
%INC contains all modules that have been loaded.
See https://perldoc.perl.org/perlvar#%INC
say for keys %INC;
-Levi
Opprinnelig melding
Den 01.10.2024 17:31, Andy Bach skrev:
> Look at perldoc for "require" but I believ
Look at perldoc for "require" but I believe what you want is @INC in place
of your @used. Hmm, maybe not
% perl -E 'use strict; say for ( @INC );'
/Library/Perl/5.34/darwin-thread-multi-2level
/Library/Perl/5.34
/Network/Library/Perl/5.34/darwin-thread-multi-2level
/Network/Library/Perl/5.34
/Lib
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
--
To unsubscribe, e-mail: beginne