LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   instmodsh not working (https://www.linuxquestions.org/questions/linux-newbie-8/instmodsh-not-working-745564/)

visu_kvg 08-06-2009 08:16 AM

instmodsh not working
 
Well guys I am trying to list the installed perl modules as follows

Code:

instmodsh
But I am getting the following error

Quote:

syntax error at /usr/bin/instmodsh line 73, near "else"
Global symbol "$file" requires explicit package name at /usr/bin/instmodsh line 73.
syntax error at /usr/bin/instmodsh line 96, near "}"
Execution of /usr/bin/instmodsh aborted due to compilation errors.


Any help is appreciated.

knudfl 08-07-2009 09:32 AM

'/usr/bin/instmodsh' and the modules used to do
the tasks handled by 'instmodsh' are provided by
the package 'perl'.

Suggest : Reinstall 'perl'.
EL 4 : The latest seems to be perl-5.8.5-36.el4
EL 5 : ......... perl-5.8.8-18.el5
.....

knudfl 08-08-2009 05:50 AM

Other ways to list modules
1)
Code:

perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \ 'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'
2)
perldoc perllocal

3) ( list-installed.pl )
perl list-installed.pl
Code:

use ExtUtils::Installed;

my $module;
my $inst = ExtUtils::Installed->new();
my (@modules) = $inst->modules();
    foreach $module (@modules) {
        print "$module \n";
}



All times are GMT -5. The time now is 07:05 AM.