in Perl, when I do use <module name> <ver>;
, the system finds the .pm
file for the library somewhere in the @INC
path.
Is there a reliable way to which file was actually loaded?
Check installed perl modules via terminal Available commands are: l - List all installed modules m <module> - Select a module q - Quit the program cmd? Then type l to list all the installed modules, you can also use command m <module> to select the module and get its information. After finish, just type q to quit.
Yes, %INC
contains the full path a module was loaded from.
Example:
$ perl -M'Data::Dump qw(pp)' -e 'pp(\%INC)' { "Data/Dump.pm" => "/usr/share/perl5/Data/Dump.pm", "Exporter.pm" => "/usr/share/perl/5.10/Exporter.pm", "List/Util.pm" => "/usr/lib/perl/5.10/List/Util.pm", "Scalar/Util.pm" => "/usr/lib/perl/5.10/Scalar/Util.pm", "XSLoader.pm" => "/usr/lib/perl/5.10/XSLoader.pm", "overload.pm" => "/usr/share/perl/5.10/overload.pm", "strict.pm" => "/usr/share/perl/5.10/strict.pm", "vars.pm" => "/usr/share/perl/5.10/vars.pm", "warnings.pm" => "/usr/share/perl/5.10/warnings.pm", "warnings/register.pm" => "/usr/share/perl/5.10/warnings/register.pm", }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With