I tried to check if XML::Simple is installed in my system or not.
perl -e 'while (<@INC>) { while (<$_/*.pm>) { print "$_\n"; } }'
The above one-liner was used for listing all modules installed in my system. However, it is not listing XML modules.
However, the following executes fine.
perl -e "use XML::Simple "
What might be the issue?
If you want to quickly check if a module is installed (at least on Unix systems, with Bash as shell), add this to your .bashrc file:
Then you can:
You can check for a module's installation path by:
The problem with your one-liner is that, it is not recursively traversing directories/sub-directories. Hence, you get only pragmatic module names as output.
Quick and dirty:
From the perlvar entry on
%INC
: